|
@@ -27,7 +27,7 @@ export class RoleService extends BaseService<Role> {
|
|
|
//是否是超级管理员
|
|
|
async isSuperAdmin() {
|
|
|
const user = this.ctx.user;
|
|
|
- if (isArray(user.role) && user.role.includes('Admin')) {
|
|
|
+ if (user.is_super) {
|
|
|
const qb: QueryOpera[] = [{ column: 'id', value: user.id, opera: [Opera.Equal] }];
|
|
|
const admin = await this.adminService.fetch(qb);
|
|
|
if (!admin) return false;
|