+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Multiple roles for one user problem

Multiple roles for one user problem

5 posts, 0 answered
  1. Louis Farrell
    Louis Farrell avatar
    37 posts
    Registered:
    24 May 2010
    01 Oct 2010
    Link to this post
    Hey,

    OK, so i have 3 users.

    user1 is in role Untrained.
    user2 is in role Trained.
    user3 is in role Untrained and Trained.

    Untrained users can only view page1
    Trained users can only view page2

    user1 can view page1 and not page2 - OK
    user2 can view page2 and not page1 - OK
    user3 can view neither - NOT OK

    How can i get around this? Where is the logic for this in the filesystem?

    Thanks in advance!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    01 Oct 2010
    Link to this post
    Hi Louis Farrell,

    This user belongs in two roles and when you have set deny access for one of these roles the user will not be able to see the object, because deny access for a given right has a higher priority than allow. This is how the permissions works and this behavior cannot be changed.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Cristian Apavaloaiei
    Cristian Apavaloaiei avatar
    20 posts
    Registered:
    29 Aug 2008
    11 Oct 2010
    Link to this post
    Hello,
    I have a similar problem. I have two roles, user and administrator. I need users not to have access to administrator areas, but administrators that are also users must have access to both secured areas. From my knowledge, this can be easily obtained using simple web.config files in asp.net webforms, because the first rule that is a match in the authorization section takes precedence, so deny does not have a higher priority than allow. For example:
    <configuration>
        <system.web>
          <authorization>
            <allow roles="Administrator"/>
            <deny roles="User"/>
          </authorization>
        </system.web>
    </configuration>
    allows all Administrators to view the content, even if they are also "Users". Can sitefinity provide me with the same functionality or do i have to create pages and folders outside sitefinity to get this behaviour?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    11 Oct 2010
    Link to this post
    Hello Cristian,

    The section you have pasted is valid if you are working with static pages that are not part of Sitefinity. By default if a user from Sitefinity belongs to Administrators role he/she has unrestricted permissions and in this case the permissions set for the other role are not taken. Administrators is a special role in Sitefinity.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Cristian Apavaloaiei
    Cristian Apavaloaiei avatar
    20 posts
    Registered:
    29 Aug 2008
    11 Oct 2010
    Link to this post
    I forgot to mention the example is for a different MembershipProvider, that works alongside the Sitefinity provider. What i was interested in is strictly how i can get the same behavior using the authorization functionality inside Sitefinity.
Register for webinar
5 posts, 0 answered