DoesUserHavePermissions returning false, when user have view permission?
I have site collection and iterating user permissions for each subsites underneath. I have see couple sites have permissions to see. But when i do in the code level (below code) giving results false.
I don't know have to get his permissions other than this. When I go to url he has permission to see.
Please help me out.
sweb.DoesUserHavePermissions(suser.LoginName, SPBasePermissions.ViewPages |
SPBasePermissions.ViewListItems | SPBasePermiss开发者_JAVA百科ions.ViewFormPages)
Your code checks if the user has all three View permissions, which apparently isn't the case. If you just want to check if he has the most basic access, then you should check for SPBasePermissions.Open
精彩评论