Modify group membership of user at runtime

Vote:
 
Hi! I would like to modify group membership of the "current user" at runtime if the user is logged on as Anonymous. I have managed to edit the UnifiedPrincipal object and change a GroupList item to something else. I have also removed the original object from cache and added the modified, but EPiServer still uses the original object when showing pages. Have I missed some step I must take or is this solution a dead end? Brgds Jonas Hilmersson
#12026
Dec 19, 2003 16:11
Vote:
 
I found another thing to edit as well, and that is the SidList. Now I changes this, but it still does not work as expected. If I query IsInRole("Everyone"), I get True even if I changed both the GroupList and the SidList. /Jonas
#13543
Dec 19, 2003 16:49
Vote:
 
Why do you need to change role membership of the anonymous user ? Maybe there is another way to solve this...
#13544
Dec 20, 2003 10:53
Vote:
 
Hi! I want all anonymous users to be able to read all content, but the content editors of different "branches" should not be able to see other branches than his/her own. As I cannot exclude users from the Everyone group, I have to remove the permissions for the group instead and assign anonymous users to a new group which will have read permissions for all content. The editors will be assigned to different groups which in turn will have permission to access only the branch related to themselves and not the other editors. Maybe there is another way of doing this? /Jonas
#13545
Dec 21, 2003 17:10
Vote:
 
Well, you could assign access to the Anonymous user instead which only will apply to users that havent been logged in, Everyone group will affect all users - logged in or not.
#13546
Dec 21, 2003 18:49
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.