mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-10 16:12:50 +00:00
fix pg
This commit is contained in:
parent
7706dc90de
commit
f8e981faaa
@ -24,10 +24,10 @@ import { BaseSysRoleService } from '../../../service/sys/role';
|
||||
const { userId, roleIds, username } = ctx.admin;
|
||||
return [
|
||||
// 超级管理员的角色不展示
|
||||
['label != :label', { label: 'admin' }],
|
||||
['a.label != :label', { label: 'admin' }],
|
||||
// 如果不是超管,只能看到自己新建的或者自己有的角色
|
||||
[
|
||||
`(userId=:userId or id in (${roleIds.join(',')}))`,
|
||||
`(a.userId=:userId or a.id in (${roleIds.join(',')}))`,
|
||||
{ userId },
|
||||
username !== 'admin',
|
||||
],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user