문제

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