From 45989060321385083dab00638314c248ea5cd2e7 Mon Sep 17 00:00:00 2001 From: o2sword <171715986@qq.com> Date: Tue, 25 Oct 2022 14:36:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=86=85=E5=AE=B9=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=99=AE=E9=80=9A=E7=94=A8=E6=88=B7=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=9D=83=E9=99=90=E4=B8=8D=E8=B6=B3=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/x/cms/assemble/control/Business.java | 11 ++++++++++- .../program/center/jaxrs/collect/ActionValidate.java | 6 ++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/Business.java b/o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/Business.java index 39df2c02d0..d8534cf338 100644 --- a/o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/Business.java +++ b/o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/Business.java @@ -449,6 +449,7 @@ public class Business { } } } + boolean publishFlag = document == null ? true : false; if (categoryInfo != null) { Set catePersonList = new HashSet<>(categoryInfo.getManageablePersonList()); Set cateUnitList = new HashSet<>(categoryInfo.getManageableUnitList()); @@ -457,6 +458,10 @@ public class Business { catePersonList.addAll(categoryInfo.getPublishablePersonList()); cateUnitList.addAll(categoryInfo.getPublishableUnitList()); cateGroupList.addAll(categoryInfo.getPublishableGroupList()); + if(!categoryInfo.getPublishablePersonList().isEmpty() || !categoryInfo.getPublishableUnitList().isEmpty() + || !categoryInfo.getPublishableGroupList().isEmpty()){ + publishFlag = false; + } } if (catePersonList.size() > 0 && catePersonList.contains(person.getDistinguishedName())) { return true; @@ -476,6 +481,10 @@ public class Business { appPersonList.addAll(appInfo.getPublishablePersonList()); appUnitList.addAll(appInfo.getPublishableUnitList()); appGroupList.addAll(appInfo.getPublishableGroupList()); + if(!appInfo.getPublishablePersonList().isEmpty() || !appInfo.getPublishableUnitList().isEmpty() + || !appInfo.getPublishableGroupList().isEmpty()){ + publishFlag = false; + } } if (appPersonList.size() > 0 && appPersonList.contains(person.getDistinguishedName())) { return true; @@ -487,7 +496,7 @@ public class Business { return true; } } - return false; + return publishFlag; } /** diff --git a/o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/collect/ActionValidate.java b/o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/collect/ActionValidate.java index 0b5f8c1661..9749166006 100644 --- a/o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/collect/ActionValidate.java +++ b/o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/collect/ActionValidate.java @@ -14,11 +14,9 @@ class ActionValidate extends BaseAction { wo.setValue(true); if (BooleanUtils.isNotTrue(this.connect())) { wo.setValue(false); - } - if (BooleanUtils.isFalse(Config.collect().getEnable())) { + }else if (BooleanUtils.isFalse(Config.collect().getEnable())) { wo.setValue(false); - } - if (BooleanUtils.isNotTrue(this.validate(Config.collect().getName(), Config.collect().getPassword()))) { + }else if (BooleanUtils.isNotTrue(this.validate(Config.collect().getName(), Config.collect().getPassword()))) { wo.setValue(false); } result.setData(wo); -- GitLab