November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
EPiServer.Security.
AccessLevel requestedLevel = AccessLevel.Publish; PageData pd = DataFactory.Instance.GetPage(PageReference.StartPage);
HashSet<string> users = new HashSet<string>();
foreach( string key in pd.ACL.Keys )
{
AccessControlEntry ace = pd.ACL[key];
if(0 == (ace.Access & requestedLevel))
continue;
if(ace.EntityType==SecurityEntityType.Role)
{
foreach(string user in Roles.GetUsersInRole(ace.Name))
users.Add(user);
}
else users.Add(ace.Name);
}
/johan
It would, except I'm reusing the Workrooms demo template which assigns access right for a user directly on the page (ie it's not based on a role)
Many thanks
Matt
Hi,
Given a page reference, what would be the best way to search for users who have access to that page?
Many thanks
Matt