user chceker 对select检查先注释
This commit is contained in:
parent
4fff3c79e1
commit
38b808fe0c
|
|
@ -50,29 +50,29 @@ var checkers = [
|
||||||
},
|
},
|
||||||
errMsg: '不能禁用root用户',
|
errMsg: '不能禁用root用户',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
type: 'row',
|
// type: 'row',
|
||||||
action: 'select',
|
// action: 'select',
|
||||||
entity: 'user',
|
// entity: 'user',
|
||||||
filter: function (operation, context) {
|
// filter: function (operation, context) {
|
||||||
var systemId = context.getSystemId();
|
// var systemId = context.getSystemId();
|
||||||
if (systemId) {
|
// if (systemId) {
|
||||||
return {
|
// return {
|
||||||
id: {
|
// id: {
|
||||||
$in: {
|
// $in: {
|
||||||
entity: 'userSystem',
|
// entity: 'userSystem',
|
||||||
data: {
|
// data: {
|
||||||
userId: 1,
|
// userId: 1,
|
||||||
},
|
// },
|
||||||
filter: {
|
// filter: {
|
||||||
systemId: systemId,
|
// systemId: systemId,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
};
|
// };
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
entity: 'user',
|
entity: 'user',
|
||||||
action: 'update',
|
action: 'update',
|
||||||
|
|
|
||||||
|
|
@ -51,29 +51,30 @@ const checkers: Checker<EntityDict, 'user', RuntimeCxt> [] = [
|
||||||
},
|
},
|
||||||
errMsg: '不能禁用root用户',
|
errMsg: '不能禁用root用户',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
type: 'row',
|
// type: 'row',
|
||||||
action: 'select',
|
// action: 'select',
|
||||||
entity: 'user',
|
// entity: 'user',
|
||||||
filter: (operation, context) => {
|
// filter: (operation, context) => {
|
||||||
const systemId = context.getSystemId();
|
// const systemId = context.getSystemId();
|
||||||
if (systemId) {
|
// // todo 查询用户 先不加systemId
|
||||||
return {
|
// if (systemId) {
|
||||||
id: {
|
// return {
|
||||||
$in: {
|
// id: {
|
||||||
entity: 'userSystem',
|
// $in: {
|
||||||
data: {
|
// entity: 'userSystem',
|
||||||
userId: 1,
|
// data: {
|
||||||
},
|
// userId: 1,
|
||||||
filter: {
|
// },
|
||||||
systemId,
|
// filter: {
|
||||||
},
|
// systemId,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
};
|
// },
|
||||||
}
|
// };
|
||||||
},
|
// }
|
||||||
},
|
// },
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
entity: 'user',
|
entity: 'user',
|
||||||
action: 'update',
|
action: 'update',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue