diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar index 4494cc85..7917a6ee 100644 Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ 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 c1d96415..630f6512 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 @@ -11668,6 +11668,22 @@ public class CoeProcessLevelWeb extends ActionWeb { for (int i = 0; i < repositoryIdArr.size(); i++) { String repositoryId = repositoryIdArr.getString(i); PALRepositoryModel model = PALRepositoryCache.getCache().get(repositoryId); + + + List removeList = new ArrayList<>();// 记录所有要删除的版本和子级 + removeList.addAll(PALRepositoryCache.getByVersionId(model.getVersionId()));// 当前模型的所有版本 + List childList = new ArrayList<>(); + Set ids = new HashSet<>(); + PALRepositoryCache.getAllChildrenModelsByPid(model.getWsId(), model.getId(), childList, ids); + removeList.addAll(childList); + for (PALRepositoryModel removeModel : removeList) { + //普通用户不允许删除已发布的文件 + if (removeModel.isPublish() && !"admin".equals(_uc.getUID())) { + return ResponseObject.newErrResponse("已发布文件["+ removeModel.getName() + VersionUtil.getVersionStrV(removeModel.getVersion()) + "]不允许删除,请联系系统管理员!").toString(); + } + } + + //新版小组的权限校验 ResponseObject res = ResponseObject.newOkResponse(); CoeCooperationAPIManager.getInstance().queryCooperationFileActionPerm(teamId, _uc.getUID(), model.getVersionId(), res); @@ -11676,10 +11692,7 @@ public class CoeProcessLevelWeb extends ActionWeb { failed++; continue; } - //普通用户不允许删除已发布的文件 - if (model.isPublish() && !"admin".equals(_uc.getUID())) { - return ResponseObject.newErrResponse("已发布文件不允许删除,请联系系统管理员!").toString(); - } + if (model.isPublish() && "admin".equals(_uc.getUID())) { CancelPublishKnwl("com.actionsoft.apps.coe.pal", _uc.getSessionId(), model.getExt4()); }