سؤال

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 | SPBasePermissions.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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top