I am trying to check permissions for SharePoint users in c# and I came across the following code that seems to work:
isGranted = spweb.DoesUserHavePermissions(userlogin, SPBasePermissions.EmptyMask | SPBasePermissions.ViewPages);
The first argument is the user to check a permission of. The second argument is the permission to check if the user has.
My question is, what is the result of the bitwise-or between emptymask and viewpages permissions? What permission is this actually checking against?
Since EmptyMask
is defined as zero, the result is the same as passing the SPBasePermissions.ViewPages
with no EmptyMask
:
[Flags]
public enum SPBasePermissions
{
EmptyMask = 0×0000000000000000,
...
}