foreach (RawACE ace in page.ACL.ToRawACEArray()) {
if ((ace.Access & AccessLevel.Read) == AccessLevel.Read) { accessRead.Add(ace.Name);
if (ace.AutomaticEntryType == SecurityEntityType.User) users.Add(ace.Name); }
...
}
What I'm trying to do is collecting data about access rights for groups and users seperated. But "if (ace.AutomaticEntryType == SecurityEntityType.User)" is true for both users and groups and if I change it to "if (ace.AutomaticEntryType == SecurityEntityType.Role)" it's false far alla users and groups...
Is this a bug? How can I check if the RawACE is for a user? I don't want to check it through the name in case there is a group with the same name as a user.
Hey
I got this code :
foreach (RawACE ace in page.ACL.ToRawACEArray())
{
if ((ace.Access & AccessLevel.Read) == AccessLevel.Read)
{
accessRead.Add(ace.Name);
if (ace.AutomaticEntryType == SecurityEntityType.User)
users.Add(ace.Name);
}
...
}
What I'm trying to do is collecting data about access rights for groups and users seperated. But "if (ace.AutomaticEntryType == SecurityEntityType.User)" is true for both users and groups and if I change it to "if (ace.AutomaticEntryType == SecurityEntityType.Role)" it's false far alla users and groups...
Is this a bug? How can I check if the RawACE is for a user? I don't want to check it through the name in case there is a group with the same name as a user.
Thanks in advance /Peter