Granting and Managing Item Level Permission using SharePoint2013 Designer Workflow
https://gnanasivamgunasekaran.wordpress.com/2015/12/29/granting-and-managing-item-level-permission-using-sharepoint2013-designer-workflow/
Granting permission to the user by SharePoint 2013 designer workflow is different from SharePoint 2010.we are using the Rest API to grant the permission as follows
Create the Workflow and assign permission
- Open the site in SharePoint 2013 designer and select the list for which workflows needs to be created and click new option,
- Specify the name of the workflow and click ok ,
- Add the action build the dictionary ,
- After adding the actions create the headers for REST api call as follows,
- Click the link this and create the following two variables
Name | Type | Value |
Accept | String | application/json;odata=verbose |
Content-Type | String | application/json;odata=verbose |
- Create the following local variables by clicking the local variables link in top ribbon,
Name | Type |
responseContent | Dictionary |
responseHeaders | Dictionary |
responseCode | String |
requestHeaders | Dictionary |
- Now set the requestHeaders variable to the outcome variable of dictionary builded.
- Then add the Call Http web service action,
- Right click the above action and configure the properties as follows,
- Add the following URL in above action and select the HTTP method as POST as follows,
“{SiteURL}/_api/web/lists/getbytitle(‘Sample’)/items(1)/breakroleinheritance(true)”
- The above http call will stop inheritance of permission for the item with id 1.
- After that add one more Call http web service action, configure the same properties as same as previous action.
- Now configure the following URL in Enter Http web service URL and specify the method as HTTP Post,
“{SiteURL}/_api/web/lists/getbytitle(‘Sample’)/items(1)/roleassignments/addroleassignment(principalid=12,roleDefId=1073741926)”
- In this Principal ID is the Id of the User to whom we need to grant permission and roledefinition Id is the permission level Id which can identified using the following URL
“{SiteURL}/_api/web/roledefinitions”
- That’s it , while running this workflow the REST api call will break the inheritance role for the particular item and grant the specified permission level (RolDefId) for the user .
Removing the Permission of Specified user
- For removing the permission of the user in particular item, we need to design workflow as same as above for granting permissions.
- Similarly same HTTP action to be called to break the role inheritance and call one HTTP action with the below URL,
{SiteURL}/_api/web/lists/getbytitle(‘Sample’)/items(1)/roleassignments/getbyprincipalid(12)
Get by principal ID is the ID of the User.
- Then select the HTTP method as delete
- Now running the above workflow it will fill stop inheriting the permission and the second web service call will remove the permission for the user with ID 12.
Granting and Managing Item Level Permission using SharePoint2013 Designer Workflow的更多相关文章
- SharePoint2013工作流workflow manager配置
SharePoint2013版本的工作流较sharepoint 2010变化较大,将工作流部分从sharepoint中分离出来为单独的服务,通过与sharepoint关联使用. SharePoint2 ...
- SharePoint Security and Permission System Overview
转:http://www.sharepointblues.com/2010/09/01/sharepoint-security-and-permission-system-overview/ Shar ...
- Binary Tree Level Order Traversal II [LeetCode]
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left ...
- Binary Tree Level Order Traversal [LeetCode]
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, ...
- 4.4. Item Pipeline管道文件
0:Spider爬取数据 # -*- coding: utf-8 -*- import scrapy import sys from mySpider.items import ItcastItem ...
- Sharepoint学习笔记—习题系列--70-576习题解析 -(Q25-Q28)
Question 25 You are designing a SharePoint 2010 farm in your organization. You need to design the li ...
- Oracle Applications Multiple Organizations Access Control for Custom Code
档 ID 420787.1 White Paper Oracle Applications Multiple Organizations Access Control for Custom Code ...
- SharePoint Server 2019新特性
.基于.NET4.7框架 功能基本是把office365的SPO功能搬家过来.如下: Sharepoint server 2019将在2018年发布 New web parts There were ...
- Microsoft SQL Server Trace Flags
Complete list of Microsoft SQL Server trace flags (585 trace flags) REMEMBER: Be extremely careful w ...
随机推荐
- MySQL :: MySQL 8.0 Reference Manual :: B.6.4.3 Problems with NULL Values https://dev.mysql.com/doc/refman/8.0/en/problems-with-null.html
MySQL :: MySQL 8.0 Reference Manual :: B.6.4.3 Problems with NULL Values https://dev.mysql.com/doc/r ...
- 服务器和客户端的交互方式(Socket,http协议)和各自特点适用范围
1 数据传输方式 1.1 Socket传输的定义和其特点 所谓socket通常也称作"套接字",实现服务器和客户端之间的物理连接,并进行数据传输,主要有UDP和TCP两个协议.S ...
- Lightoj 1003 - Drunk(拓扑排序判断是否有环 Map离散化)
题目链接:http://lightoj.com/volume_showproblem.php?problem=1003 题意是有m个关系格式是a b:表示想要和b必须喝a,问一个人是否喝醉就看一个人是 ...
- KVM中断虚拟化浅析
2017-08-24 今天咱们聊聊KVM中断虚拟化,虚拟机的中断源大致有两种方式,来自于用户空间qemu和来自于KVM内部. 中断虚拟化起始关键在于对中断控制器的虚拟化,中断控制器目前主要有APIC, ...
- 9.GIt删除操作
在Git中,删除也是一个修改操作,我们实战一下,先添加一个新文件test.txt到Git并且提交: 创建一个文件test.txt,写入一句话`this is new file !`. $ echo ' ...
- java 调用静态方法和构造函数和静态块执行的先后顺序
构造方法是只有你在new对象的时候才会执行,静态语句块和静态方法在类加载到内存的时候就已经执行了,另外,静态语句块只能给静态变量赋值,里面不能出现方法,同样,静态方法里面也不能出现静态语句块 追问: ...
- Python-装饰器-案例-获取文件列表
import os def get_all_path(fun): '''装饰器.功能:获取全路径文件名.如:D:/tmp/12.txt :param fun: :return:file_path_li ...
- [py][lc]python的纸牌知识点
模块collections-collections.namedtuple表示tuple 如表示一个坐标, t = (1,2), 搞不清楚. 如果这样就对了Point(x=1, y=2) from co ...
- PAT 1105 Spiral Matrix[模拟][螺旋矩阵][难]
1105 Spiral Matrix(25 分) This time your job is to fill a sequence of N positive integers into a spir ...
- 【android】移植IOS视图响应陀螺仪交互行为
IOS有个很有趣味的特性:背景图片可以响应陀螺仪方向的变化,去改变X.Y轴上的值,从而让整个界面看着充满着灵性.具体步骤是:解锁苹果产品,在IOS7以上,摆动手势,观察桌面背景图片的变化. 刚好,我们 ...