ows_PermMask in SharePoint WebServices

2019-08-04 10:10发布

问题:

Lists.GetListItems form the Lists Web Service returns a ows_PermMask attribute (16 character hexadecimal) for each list item.

Anyone know how this attribute maps to the user's permissions or where the meaning of this attribute is documented?

回答1:

This site should offer you a little more detail:

http://mdasblog.wordpress.com/2009/02/03/permmask-in-sharepoint-dvwps/

It is just a built in field containing the permissions required:

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbuiltinfieldid.permmask.aspx



回答2:

This link also provides some good detail on PermMask:

http://social.technet.microsoft.com/Forums/sharepoint/en-US/c16aa8e4-672b-4241-a88c-6a421000e00f/setting-itemlevel-permissions-through-sharepoints-builtin-webservices?forum=sharepointdevelopmentlegacy

From the comments in that post:

"Using the PermissionMask is only for the current user... which is likely an admin user anyway which will have the permission PermMask="0x7fffffffffffffff"... this is useless for most use cases of finding what users and groups have access to the item / document."



回答3:

The PermMask is very interesting stuff in SharePoint. The value of PermMask is hexadecimal. It is 16 digit (e.g 0x0000XXXXXXXX0000).

The minimum value is 0x0000000000000000 for no permission and maximum value is 0x7FFFFFFFFFFFFFFF for full permission (Basically site collection administrator).

[Bit Level Reservation of PermMask][1]

The list and document permissions (0x000000000000XXXX) are specified as follows.

  1. ViewListItems 0x0000000000000001
  2. AddListItems 0x0000000000000002
  3. EditListItems 0x0000000000000004
  4. DeleteListItems 0x0000000000000008
  5. ApproveItems 0x0000000000000010
  6. OpenItems 0x0000000000000020
  7. ViewVersions 0x0000000000000040
  8. DeleteVersions 0x0000000000000080
  9. CancelCheckout 0x0000000000000100
  10. ManagePersonalViews 0x0000000000000200
  11. ManageLists 0x0000000000000800
  12. ViewFormPages 0x0000000000001000

The list item permissions (0x000000000000000X) are specified as follows.

[PermMask ListItemPermissions for edit item][2]