文件夹授权添加编辑权限 编辑值为3
创建授权接口:
post请求
/kms/resources/{resourceId}/authorizations
json格式
{
"description": "llll",
"scope": 1,
"targetId": ["22TY7eJ46UvOUmmXJbc"],
"targetName": "liang",
"startDate": "",
"endDate": "",
"resourceId": "a56f8f78-52b4-44ef-af2e-fe4136974500",
"resourceType": 1,
"operations": ["2", "1", "3"],
"creatorId": "",
"creator": "",
"createDate": "",
"timeLimitType": "1"
}
文件点击编辑的时候看是否有编辑的权限
get
/kms/editAble/files/{fileId}
请求返回的json不成功数据
{
"errcode": 403,
"errmsg": "权限不足,预览文件失败"
}
请求成功json
{
"errcode": 0,
"errmsg": "ok",
"data": true
}
如果没权限则弹出申请权限按钮
post请求
/kms/applications
包体
{
"download": true,
"preview": true,
"edit": true,
"reason": "aaaa",
"resourceId": "fecd9907-834a-47d5-b20f-0c9719f075e1"
}
员工km的待办/已办json参数有编辑的参数edit
点击同意时,后台会默认赋值到有编辑权限。
注意这里点开的编辑按钮也要有逻辑判断屏蔽掉