views:

30

answers:

2

Hi, I have a problem retrieving permissions on a list or site. I'm using SharePoint's Permission Web Service and the GetPermissionCollection method. This method return somethink like this:

<Permission MemberID="4" Mask="1067654015" MemberIsUser="False" MemberGlobal="True" GroupName="Collaboration demo Owners" />

I'd like to be able to convert the permission mask into the role(s) it belongs to. (just like if you view the Permissions through the web site).

I find out that using the UserGroup Webservice , I can retrieve the list of Roles and their base permissions. GetRolesAndPermissionsForSite method from this service returns somethink like this:

<Role ID="1073741829" Name="Full Control" Description="Has full control." Hidden="False" Type="Administrator" BasePermissions="9223372036854775807"....

Is there any way to convert this BasePermissions to Mask in order to compare them? Or Is any simpler way to convert the permission mask into the role(permission level) it belongs to?

A: 

Thanks for reply. I have been there and I have posted there also but without any reply. I don't understand this sentence writen by one user in above page :

Using the UserGroup Webservice , I can retrieve the list of Roles and their base permissions, which i can convert into the integer mask value. Comparing the mask values i can find out what role a user has.

Can anyone explain that? Especially the convertnig think.

Chris

Chris

related questions