工作流列表项权限 - 唯一权限 [英] Workflow List Item Permission - Unique permission
问题描述
通过Microsoft FLOW我将列表项权限设置为列表中的不同人员,它在创建新项目时工作正常,但是当我想要删除用户或更改用户时,它会添加新用户但不会删除旧用户。
Through Microsoft FLOW i set list item permission to different persons in the list, it work fine when new item is created, but when i want to remove a user or change a user then it add the new user but not remove the old user.
我用这个
breakroleinheritance(copyRoleAssignments = false,clearSubscopes = true)
但这不会删除该项目的唯一权限
我添加此人后:
roleassignments / addroleassignment(principalid = @ {variables('UserID')} ,roledefid = 1073741932)
此工作正常。
I use this
breakroleinheritance(copyRoleAssignments=false, clearSubscopes=true)
But this do not remove Unique permission for that item
After i add the person:
roleassignments/addroleassignment(principalid=@{variables('UserID')},roledefid=1073741932)
This works fine.
所以现在我给予新用户许可,旧用户仍然有权限。
So now i give new user permission and the old user still have permission.
如何删除列表项的唯一权限?
谢谢。
$
How can i remove unique permission for list item ?
Thanks.
推荐答案
如果要删除唯一权限对于列表项,我们可以使用下面的REST API。
If you want to delete unique permissions for list item, we can use the REST API below.
/_api/web/lists/getbytitle('listname')/items(1)/ResetRoleInheritance()
https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-server/ee536166%28v%3doffice.15%29
如果你想删除项目权限,我们可以使用:
If you want to remove item permission, we can use this:
/_api/web/lists/getbytitle('listname')/items(1)/roleassignments(principalId)
更多信息在这里:
使用SharePoint Workflow和REST API删除项目权限
Removing Item Permission Using SharePoint Workflow And REST API
最诚挚的问候,
丹尼斯
这篇关于工作流列表项权限 - 唯一权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!