提交 45989060 编写于 作者: O o2sword

修复内容管理普通用户发布权限不足的问题

上级 44734234
......@@ -449,6 +449,7 @@ public class Business {
}
}
}
boolean publishFlag = document == null ? true : false;
if (categoryInfo != null) {
Set<String> catePersonList = new HashSet<>(categoryInfo.getManageablePersonList());
Set<String> 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;
}
/**
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册