November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
if (CurrentPage.ACL.QueryDistinctAccess(
AccessLevel.Create, CurrentUser.Sid ))
{
// CurrentUser has Create permission.
}
So, a SID can be a user or a group, and if you want to check if a given group has access to read a given page, you can do it in two ways.
1. Check if the group is a member of the ACL by using CurrentPage.ACL.Exists(groupSidId), and then get the AccessLevel by casting the return value of the AccessControlList indexer (the Item property) like this:
AccessLevel lvl = (AccessLevel)CurrentPage.ACL[myGroupId];
2. Loop through the RawACE array you can get from CurrentPage.ACL.ToRawACEArray(), and check if the group is part of that array, and then check the AccessLevel of the RawACE item.
In both instances, you might have to convert a group name to it's ID (the sid), if you do not have it readily available. You can do that by using the GroupSid.LoadGroup(name) static method and check the ID property of the returned object.
/Steve
... list-start ...
this text is always visible ...
... list-end ...
Jag antar att detta skall vara möjligt att få fram denna info genom denna instans, frågan är bara hur ...