mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-01 22:20:30 +08:00
Merge pull request #105 from coder-huo/6.x
fix bug in sys/role.ts change role to username
This commit is contained in:
commit
be10208908
@ -21,7 +21,7 @@ import { BaseSysRoleService } from '../../../service/sys/role';
|
|||||||
pageQueryOp: {
|
pageQueryOp: {
|
||||||
keyWordLikeFields: ['name', 'label'],
|
keyWordLikeFields: ['name', 'label'],
|
||||||
where: async (ctx: Context) => {
|
where: async (ctx: Context) => {
|
||||||
const { userId, roleIds, role } = ctx.admin;
|
const { userId, roleIds, username } = ctx.admin;
|
||||||
return [
|
return [
|
||||||
// 超级管理员的角色不展示
|
// 超级管理员的角色不展示
|
||||||
['label != :label', { label: 'admin' }],
|
['label != :label', { label: 'admin' }],
|
||||||
@ -29,7 +29,7 @@ import { BaseSysRoleService } from '../../../service/sys/role';
|
|||||||
[
|
[
|
||||||
'(userId=:userId or id in (:roleIds))',
|
'(userId=:userId or id in (:roleIds))',
|
||||||
{ userId, roleIds },
|
{ userId, roleIds },
|
||||||
role !== 'admin',
|
username !== 'admin',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user