小组权限调整,批量创建副本接口加入小组文件权限判断
This commit is contained in:
parent
0ecb3c124a
commit
be8efc5b2f
Binary file not shown.
@ -41,6 +41,7 @@ public class CoeCooperationRolePermDao extends DaoObject<CoeCooperationRolePermM
|
||||
paraMap.put(CoeCooperationRolePermModel.TEAMID, model.getTeamId());
|
||||
paraMap.put(CoeCooperationRolePermModel.ROLEID, model.getRoleId());
|
||||
paraMap.put(CoeCooperationRolePermModel.PALVERSIONID, model.getPalVersionId());
|
||||
paraMap.put(CoeCooperationRolePermModel.ACTIONPERM, model.getActionPerm());
|
||||
String sql = DBSql.getInsertStatement(entityName(), paraMap);
|
||||
r = DBSql.update(conn, sql, paraMap);
|
||||
DBSql.close(conn);
|
||||
|
||||
@ -5058,7 +5058,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
* @return
|
||||
*/
|
||||
public String copyFile(String wsId, String teamId, String sourceUUID, String targetUUID, String copyType) {
|
||||
ResponseObject checkRo = checkCopyFile(sourceUUID, targetUUID, copyType);
|
||||
ResponseObject checkRo = checkCopyFile(teamId,sourceUUID, targetUUID, copyType);
|
||||
if (!checkRo.isOk()) { // 文件校验
|
||||
return checkRo.toString();
|
||||
}
|
||||
@ -5101,7 +5101,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
* @param targetUUID
|
||||
* @param copyType
|
||||
*/
|
||||
private ResponseObject checkCopyFile(String sourceUUID, String targetUUID, String copyType) {
|
||||
private ResponseObject checkCopyFile(String teamId,String sourceUUID, String targetUUID, String copyType) {
|
||||
PALRepositoryModel targetProcessLevelModel = PALRepositoryCache.getCache().get(targetUUID);
|
||||
if (targetUUID.length() >= 36) {
|
||||
if (targetProcessLevelModel == null) {
|
||||
@ -5112,6 +5112,15 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
if (sourceProcessLevelModel == null) {
|
||||
return ResponseObject.newErrResponse("粘贴文件失败,源文件不存在");
|
||||
}
|
||||
boolean isOlderVersion = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true);
|
||||
if (!isOlderVersion){
|
||||
ResponseObject res = ResponseObject.newOkResponse();
|
||||
CoeCooperationAPIManager.getInstance().queryCooperationFileActionPerm(teamId, _uc.getUID(),sourceProcessLevelModel.getVersionId(),res);
|
||||
Map<String,Boolean> data = (Map)res.getData();
|
||||
if (!data.get("havingWritePerm")){
|
||||
return ResponseObject.newErrResponse("粘贴文件失败,无文件操作权限");
|
||||
}
|
||||
}
|
||||
|
||||
// 新版不会有以下情况
|
||||
// if (targetProcessLevelModel.getVersionId().equals(sourceProcessLevelModel.getVersionId())) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user