diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java index 84a6e237..6454a0a2 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java @@ -9504,9 +9504,21 @@ public String deleteReply(String replyid, String messageid) { public String removePalRepositoryLevel(String wsId, String teamId, String repositoryIds) { ResponseObject ro = ResponseObject.newOkResponse(); JSONArray repositoryIdArr = JSONArray.parseArray(repositoryIds); + boolean isOlderVersion = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true); + int failed = 0; for (int i = 0; i < repositoryIdArr.size(); i++) { String repositoryId = repositoryIdArr.getString(i); PALRepositoryModel model = PALRepositoryCache.getCache().get(repositoryId); + //新版小组的权限校验 + if (!isOlderVersion){ + ResponseObject res = ResponseObject.newOkResponse(); + CoeCooperationAPIManager.getInstance().queryCooperationFileActionPerm(teamId, _uc.getUID(),model.getVersionId(),res); + Map data = (Map) res.getData(); + if (!data.get("havingRemovePerm")){ + failed ++; + continue; + } + } String result = removeTreeNode(repositoryId, wsId); JSONObject moveRo = JSONObject.parseObject(result); if (!"ok".equals(moveRo.getString("result"))) { @@ -9514,6 +9526,9 @@ public String deleteReply(String replyid, String messageid) { return ResponseObject.newErrResponse(moveRo.getString("msg")).toString(); } } + if (!isOlderVersion && failed >= repositoryIdArr.size()){ + return ResponseObject.newErrResponse("删除文件失败,无操作权限").toString(); + } // 操作行为日志记录 if (SDK.getAppAPI().getPropertyBooleanValue(CoEConstant.APP_ID, "IS_RECORD_OP_LOG", false)) { CoEOpLogAPI.auditOkOp(_uc, CoEOpLogConst.MODULE_CATEGORY_REPOSITORY, CoEOpLogConst.OP_DELETE, CoEOpLogConst.INFO_REPOSITORY_DELETE);