提交 a51859d3 编写于 作者: O o2null

Merge branch 'fix/数据中心数据表查询权限错误' into 'develop'

修复数据中心数据表查询权限错误

See merge request o2oa/o2oa!384
......@@ -31,9 +31,8 @@ class ActionListRowNext extends BaseAction {
ActionResult<List<JsonObject>> execute(EffectivePerson effectivePerson, String tableFlag, String id, Integer count)
throws Exception {
try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
logger.debug(effectivePerson.getDistinguishedName());
ActionResult<List<JsonObject>> result = new ActionResult<>();
logger.debug(effectivePerson, "table:{}, id:{}, count:{}.", tableFlag, id, count);
Business business = new Business(emc);
Table table = emc.flag(tableFlag, Table.class);
if (null == table) {
......
......@@ -29,7 +29,7 @@ class ActionListRowSelect extends BaseAction {
if (null == table) {
throw new ExceptionEntityNotExist(tableFlag, Table.class);
}
if (!business.editable(effectivePerson, table)) {
if (!business.readable(effectivePerson, table)) {
throw new ExceptionAccessDenied(effectivePerson, table);
}
DynamicEntity dynamicEntity = new DynamicEntity(table.getName());
......
......@@ -27,7 +27,7 @@ class ActionListRowSelectWhere extends BaseAction {
if (null == table) {
throw new ExceptionEntityNotExist(tableFlag, Table.class);
}
if (!business.editable(effectivePerson, table)) {
if (!business.readable(effectivePerson, table)) {
throw new ExceptionAccessDenied(effectivePerson, table);
}
DynamicEntity dynamicEntity = new DynamicEntity(table.getName());
......
......@@ -27,7 +27,7 @@ class ActionRowCountWhere extends BaseAction {
if (null == table) {
throw new ExceptionEntityNotExist(tableFlag, Table.class);
}
if (!business.editable(effectivePerson, table)) {
if (!business.readable(effectivePerson, table)) {
throw new ExceptionAccessDenied(effectivePerson, table);
}
DynamicEntity dynamicEntity = new DynamicEntity(table.getName());
......@@ -50,4 +50,4 @@ class ActionRowCountWhere extends BaseAction {
}
}
\ No newline at end of file
}
......@@ -20,7 +20,7 @@ class ActionRowGet extends BaseAction {
if (null == table) {
throw new ExceptionEntityNotExist(tableFlag, Table.class);
}
if (!business.editable(effectivePerson, table)) {
if (!business.readable(effectivePerson, table)) {
throw new ExceptionAccessDenied(effectivePerson, table);
}
DynamicEntity dynamicEntity = new DynamicEntity(table.getName());
......@@ -32,4 +32,4 @@ class ActionRowGet extends BaseAction {
}
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册