Question

I'm developing a Webpart and I need to go through every document library and get its permissions. Basically I need to get the groups and its permissions associated with the document library.

I have iterated through the properties and methods of a SPDocumentLibrary object but couldn't find anything really.

Any help or guide would be appreciated.

Thank you

Was it helpful?

Solution

I would first check HasUniqueRoleAssignments. If it is false, then the permissions for that document library are inherited from the website. If it is true, as Jason said, I would then check the Member and RoleDefinitionBindings of each SPRoleAssignment.

OTHER TIPS

Try SPDocomentLibrary.RoleAssignments. This will give you SPRoleAssignments where the Member property is a SPGroup or a SPUser.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top