开发者

The SharePoint API for retrieiving all user groups and users who have access to a file

开发者 https://www.devze.com 2023-02-04 09:42 出处:网络
We are looking for a SharePoint API that provides all the users/groups which have access to a file in SharePoint if we know the URL of that document.

We are looking for a SharePoint API that provides all the users/groups which have access to a file in SharePoint if we know the URL of that document.

I looked in SPItem Class of MSDN documentation - http://msdn.microsoft.com/en-us/library/ms443717.as开发者_StackOverflowpx and could not find any method that provides this information.

Appreciate any thoughts.

Thanks.


Is this for SharePoint 2007 or 2010

For 2007 you can use

ISecurableObject.HasUniqueRoleAssignments

Any object in SharePoint that is securable will use this interface. You can then see if the object has unique security or inherits from a parent object.

You could then keep going back along the parents untill you find the unique secure object (SPSite for example)

To see what permissions are applied to a SPSecurableObject look at the RoleAssignments property and the SPRoleAssignment

0

精彩评论

暂无评论...
验证码 换一张
取 消