views:

260

answers:

1

Hi,

We have a requirement where we need to check if a user has "Upload" access to a folder in Sharepoint document library. For that, I am using the "GetPermissionCollection" method of Permissions webservice on the document library. The response I get is of below format:

I am not able to convert the Permission mask to role. I am doing this in Java and I dont have SPBasePermissions class.

Is there a way in Java to convert the Mask into role?

Thanks in advance

A: 

Yes, you just need to do bitwise operations against it. You will need to hardwire the bitmask for the permissions you care about, but this should be safe enough since these do not change in SharePoint 2010.

JD