I have three pages in a SharePoint site. Lets say




I also have two groups - say ALLACCESS and LESSACCESS

now I want

  1. A.aspx page should access only by ALLACCESS, no LESSACCESS and no other users
  2. B.aspx page should access only by ALLACCESS and LESSACCESS users (No other users - Ex NT authorized users)
  3. C.aspx page Should access by all the users.

My solution for your reference: Use 2 Sandbox Webparts which will check current user's group information.

One will throw exception and redirect to an "Access Not Allowed" page if current user groups is not "ALLACCESS", insert this webpart to A.aspx; the other will throw exception and redirect to the "Access Not Allowed" page if current user group is not "ALLACCESS" or not "LESSACCESS", insert this webpart to B.aspx.

For c.aspx, do nothing, just let it inherients the site permissions.

This post could provide some help for you to check user's group information: http://forums.asp.net/t/1012092.aspx/1

  • That's a great idea, let me try with that!! And should I use visual webpart? – Jithu Nov 23 '11 at 5:01
  • I think just normal sandbox webpart should be ok, since we don't need any output here. – Jony Nov 23 '11 at 5:18

I hope I have understood your question correctly.

Permissions are traversed from Sites to Subsites and then to lists or libraries. If all these 3 pages are in different sites, subsites, lists or in different libraries, then this could be done.

If they are in different libraries or different subsites then you need to edit the permissions by 'Stop inheriting Permissions' and give the rights only to particular groups that are intended to access.

  • Hi Deepu, Thank you for your explanation - All these pages are inside a team Site !! – Jithu Nov 22 '11 at 9:24
  • You can create three different libraries and set these pages in them respectively and set permissions to the library OR create a custom web part which would check for the logged in user group and hide the other contents using javascript programatically. In this case you can use a single page to function like three pages based on the logged in user group. – Deepu Nair Nov 22 '11 at 11:46
  • That is a great Idea, Let me try with yours and Jony's ideas.. – Jithu Nov 23 '11 at 5:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.