Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have three pages in a SharePoint site. Lets say

A.aspx

B.aspx

C.aspx

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.
share|improve this question

2 Answers 2

up vote 1 down vote accepted

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

share|improve this answer
    
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
    
Thanks Jony, Let me try this !! –  Jithu Nov 23 '11 at 5:25
    
Thanks Jony got it worked!! The link was excellent !! –  Jithu Nov 23 '11 at 13:06

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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