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