针对文件详情接口添加文件控制权限flag
This commit is contained in:
parent
a8b8bd3ba3
commit
6787b98716
Binary file not shown.
@ -656,6 +656,33 @@ public class CoeCooperationAPIManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取小组成员指定文件的操作权限
|
||||
* @param teamId
|
||||
* @param userId
|
||||
* @param versionId
|
||||
* @param ro
|
||||
*/
|
||||
public void queryCooperationFileActionPerm(String teamId, String userId,String versionId, ResponseObject ro) {
|
||||
boolean isOlderVersion = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true);
|
||||
if (isOlderVersion){
|
||||
return;
|
||||
}
|
||||
boolean havingWritePerm = true;
|
||||
boolean havingRemovePerm = true;
|
||||
boolean havingVersionManagePerm = true;
|
||||
int validUserPermDataCount = 0;// 当前小组成员有效(流程表中存在)的数据权限数量
|
||||
if (StringUtils.isNotEmpty(teamId) && isInstall()) {
|
||||
Set<String> userOperatePermission = CooperationCache.getUserDataOperatePermission(teamId, userId,versionId);
|
||||
havingWritePerm = userOperatePermission.contains(CoeCooperationConst.ACTION_WRITE);// 新增、修改权限
|
||||
havingRemovePerm = userOperatePermission.contains(CoeCooperationConst.ACTION_DELETE);// 删除权限
|
||||
havingVersionManagePerm = userOperatePermission.contains(CoeCooperationConst.ACTION_VERSION);// 版本管理权限
|
||||
}
|
||||
ro.put("havingWritePerm", havingWritePerm);// 新增、修改权限
|
||||
ro.put("havingRemovePerm", havingRemovePerm);// 删除权限
|
||||
ro.put("havingVersionManagePerm", havingVersionManagePerm);// 版本管理权限
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断小组成员是否有某类操作权限
|
||||
* @param teamId
|
||||
|
||||
@ -9258,6 +9258,14 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
object.put("photoType", photoType);
|
||||
object.put("photo", photo);
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
//新版权限获取文件操作权限
|
||||
CoeCooperationAPIManager.getInstance().queryCooperationFileActionPerm(teamId,_uc.getUID(),model.getVersionId(),ro);
|
||||
Map data = (Map)ro.getData();
|
||||
if (data != null && !data.isEmpty()){
|
||||
object.put("havingWritePerm", data.get("havingWritePerm"));// 新增、修改权限
|
||||
object.put("havingRemovePerm",data.get("havingRemovePerm") );// 删除权限
|
||||
object.put("havingVersionManagePerm",data.get("havingVersionManagePerm") );// 版本管理权限
|
||||
}
|
||||
ro.setData(object);
|
||||
return ro.toString();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user