REST or SPServices Update permissions on multiple items in list on condition

Could anybody please help me or point me in the right direction please;

I would like to use REST or SPServices, when a script is run from a button on a sharepoint form; to loop through all items in a list and update/replace the item permissions of every item when the current permissions include a user which will be selected in a people picker in the sharepoint form. There will be a second people picker which i would like to add that person to the item permissions.

I have found loads of great examples for both REST and SPServices to update the viewable fields but none which deal with permissions.

September 14th, 2015 9:43am

Hi,            

To update list item permissions using REST API, there are two important methods would be helpful:

BreakRoleInheritance method

https://msdn.microsoft.com/en-us/library/office/dn531433.aspx#bk_ListItemBreakRoleInheritance

RoleAssignmentCollection methods

https://msdn.microsoft.com/en-us/library/office/dn531432.aspx#bk_RoleAssignmentCollectionMethods

Here is a blog about how to set unique permissions on a list item with code demos provided for your reference:

http://spsite.pro/Blog/Post/3/SharePoint-2013-REST-API-%E2%80%93-How-to-set-Unique-Permissions-%28Item-Level-Permissions%29   

Thanks
Free Windows Admin Tool Kit Click here and download it now
September 15th, 2015 12:59am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics