Automatically set edit rights for list entries
AnsweredWould it be possible to add a feature for automatically setting edit rights on list entries? Implementation could be as follows:
name field gets an extra option like: 'use for security'
If then somebody adds a name to that field a triggered action automatically assigns this name the right to edit the list entry (and nobody else can).
Of course I must be able to add a kind of default security. For example a group 'my-company-listadmin' can always edit list entries.
-
Hi Detlev
You can configure this case by HTTP Request Actions which calls the SharePoint REST API in the Triggered Actions to set the described permissions.
Check out this article: Set single item permissions using skybow Triggered ActionsFor your case create an additional PeoplePicker field named "use for security" which you can loop over to get each person's Id and call the REST API per person.
Do the same for SP Groups with a leading Send HTTP request action to get the id of your group. In the following example the SP group is called "AppAdministratoren":{ return [[@Web.Url]] + "/_api/web/sitegroups/getbyname('AppAdministratoren')/id"; }
And use the output of this exectued action as [[=[[@Actions.Send_HTTP_request_Get_AppAdministratoren_group_ID_.ResponseBody]].value]] in the next request that sets the permission: [[@Web.Url]]/_api/web/lists/getByTitle('ListName')/items([[ID]])/roleassignments/addroleassignment(principalid='[[=[[@Actions.Send_HTTP_request_Get_AppAdministratoren_group_ID_.ResponseBody]].value]]',roleDefId=1073741827)0
Please sign in to leave a comment.
Comments
1 comment