edit
This commit is contained in:
		| @ -22,7 +22,7 @@ import { | |||||||
|   UrlTree |   UrlTree | ||||||
| } from '@angular/router'; | } from '@angular/router'; | ||||||
| import { ACLCanType, ACLGuard, ACLGuardType, ACLService } from '@delon/acl'; | import { ACLCanType, ACLGuard, ACLGuardType, ACLService } from '@delon/acl'; | ||||||
| import { MenuService } from '@delon/theme'; | import { MenuService, SettingsService } from '@delon/theme'; | ||||||
| import { BaseService, EAUserService } from '@shared'; | import { BaseService, EAUserService } from '@shared'; | ||||||
| import { Observable, of } from 'rxjs'; | import { Observable, of } from 'rxjs'; | ||||||
| import { delay, map, switchMap, tap } from 'rxjs/operators'; | import { delay, map, switchMap, tap } from 'rxjs/operators'; | ||||||
| @ -34,6 +34,7 @@ export class AuthGuard extends ACLGuard { | |||||||
|     public srv1: ACLService, |     public srv1: ACLService, | ||||||
|     private baseService: BaseService, |     private baseService: BaseService, | ||||||
|     private menuService: MenuService, |     private menuService: MenuService, | ||||||
|  |     private settings: SettingsService, | ||||||
|     router: Router, |     router: Router, | ||||||
|     private inject: Injector |     private inject: Injector | ||||||
|   ) { |   ) { | ||||||
| @ -61,9 +62,13 @@ export class AuthGuard extends ACLGuard { | |||||||
|     if (!router) { |     if (!router) { | ||||||
|       return type === 1 ? super.canActivate(route, state) : super.canActivateChild(route, state); |       return type === 1 ? super.canActivate(route, state) : super.canActivateChild(route, state); | ||||||
|     } |     } | ||||||
|     return this.baseService.request('/api/mdc/cuc/enterpriseProject/getUserDefaultEnterpriseProject').pipe( |     return this.baseService | ||||||
|  |       .request('/api/mdc/cuc/userAuthority/isUserAdmin', { | ||||||
|  |         appUserId: this.settings.user.appUserId | ||||||
|  |       }) | ||||||
|  |       .pipe( | ||||||
|         switchMap(res => { |         switchMap(res => { | ||||||
|         if (res.enterpriseIdentity) { |           if (res) { | ||||||
|             // 超级管理员赋值全量权限 |             // 超级管理员赋值全量权限 | ||||||
|             this.srv1.setFull(true); |             this.srv1.setFull(true); | ||||||
|             return of(true); |             return of(true); | ||||||
|  | |||||||
| @ -304,7 +304,7 @@ export class UserCenterComponentsDriverComponent implements OnInit { | |||||||
|         fixed:'right', |         fixed:'right', | ||||||
|         buttons: [ |         buttons: [ | ||||||
|           { |           { | ||||||
|             text: '查看', |             text: '查看<br/>', | ||||||
|             click: item => { |             click: item => { | ||||||
|               this.router.navigate(['./detail', item.appUserId], { relativeTo: this.ar }); |               this.router.navigate(['./detail', item.appUserId], { relativeTo: this.ar }); | ||||||
|               // this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } }); |               // this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } }); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user