修改了operation的权限判断
This commit is contained in:
parent
f2519da40d
commit
da983ba2bd
|
|
@ -9,6 +9,9 @@ async function operate(params, context) {
|
|||
// operate默认必须用户登录
|
||||
throw new types_1.OakUnloggedInException();
|
||||
}
|
||||
if (!context.allowUserUpdate()) {
|
||||
throw new types_1.OakUserUnpermittedException('您被禁更新');
|
||||
}
|
||||
if (operation instanceof Array) {
|
||||
const result = [];
|
||||
for (const oper of operation) {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import {
|
|||
EntityDict,
|
||||
SelectOption,
|
||||
OakUnloggedInException,
|
||||
OakUserUnpermittedException,
|
||||
} from 'oak-domain/lib/types';
|
||||
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/base-app-domain';
|
||||
import { AsyncContext } from 'oak-domain/lib/store/AsyncRowStore';
|
||||
|
|
@ -26,6 +27,9 @@ export async function operate<
|
|||
// operate默认必须用户登录
|
||||
throw new OakUnloggedInException();
|
||||
}
|
||||
if (!context.allowUserUpdate()) {
|
||||
throw new OakUserUnpermittedException('您被禁更新');
|
||||
}
|
||||
|
||||
if (operation instanceof Array) {
|
||||
const result = [];
|
||||
|
|
|
|||
Loading…
Reference in New Issue