Hello, I created document review workflow using Request review task with fixed end date 2 days.
I deal with item permissions:
1. Document have custom permissions before WF start (eg. Felix = read)
2. I add new people / permissions via Request Review - Item permissions (eg. Felix = Edit)
3. I need to remove these added persmissons aftew end of task (eg. Felix = read)
The problem is, that i will completly remove permissions for Felix. Is it possible to somehow read item permissions before modification and set its "Original" state back at the end?
1. Document have custom permissions before WF start (eg. Felix = read, Thomas = Edit)
2. I add new people / permissions (eg. Felix = Edit, Thomas = Edit. New user = Edit, New user2 = Edit)
3. Set back original item permission, (in this case it is Felix = read, Thoms = Edit)
Hmm... I do not thing it is going to be an easy and straightforward solution. There is no OOTB solution. First I'd recommend you to use "HTTP Web Request" action to call SharePoint rest api. You can get permissions of the particular user using the following REST call, using the "Accept: application/json;odata=verbose" header:
https://[web url]/_api/web/lists/getbytitle('[list name]')/items([item ID])/getusereffectivepermissions(@u)?@u='[http_escaped_user_login]'
However it will return you data in the follow:
The "High" and "Low" represents order bits for the permission. However not for the levels, but for the permissions scope itself, so "add", "edit", "delete" instead of "Contribute" for example. Moreover it is really hard without a custom code to translate them because you need to compare these values with binary masks.
So there is another way round.. But longer.
https://[web url]/_api/web/lists/getbytitle('[list name]')/items([item id])/?$expand=RoleAssignments/RoleDefinitionBindings,RoleAssignments/Member/Users
I hope this will really help you