edit
This commit is contained in:
@ -32,9 +32,9 @@ export class AuthGuard extends ACLGuard {
|
||||
constructor(
|
||||
srv: ACLService,
|
||||
public srv1: ACLService,
|
||||
private baseService: BaseService,
|
||||
private menuService: MenuService,
|
||||
private settings: SettingsService,
|
||||
private userService: EAUserService,
|
||||
router: Router,
|
||||
private inject: Injector
|
||||
) {
|
||||
@ -62,7 +62,7 @@ export class AuthGuard extends ACLGuard {
|
||||
if (!router) {
|
||||
return type === 1 ? super.canActivate(route, state) : super.canActivateChild(route, state);
|
||||
}
|
||||
return this.baseService
|
||||
return this.userService
|
||||
.request('/api/mdc/cuc/userAuthority/isUserAdmin', {
|
||||
appUserId: this.settings.user.appUserId
|
||||
})
|
||||
@ -74,13 +74,14 @@ export class AuthGuard extends ACLGuard {
|
||||
return of(true);
|
||||
} else {
|
||||
// 如果不是超级管理员 获取权限
|
||||
return this.baseService.request('/api/mdc/cuc/functionButton/getUserFunctionButton', { link: router });
|
||||
return this.userService.request('/api/mdc/cuc/functionButton/getUserFunctionButton', { link: router });
|
||||
}
|
||||
}),
|
||||
switchMap(res => {
|
||||
if (res?.abilities) {
|
||||
this.srv1.setAbility(res.abilities || []);
|
||||
this.menuService.resume();
|
||||
// this.menuService.resume();
|
||||
this.userService.loadUserMenus();
|
||||
}
|
||||
return type === 1 ? super.canActivate(route, state) : super.canActivateChild(route, state);
|
||||
})
|
||||
|
||||
@ -47,7 +47,7 @@ export class StartupService {
|
||||
});
|
||||
|
||||
let data;
|
||||
if (this.coreSrv.loginStatus && environment.production) {
|
||||
if (this.coreSrv.loginStatus) {
|
||||
// 本地菜单
|
||||
// data = this.loadMockData();
|
||||
// 远程菜单
|
||||
|
||||
Reference in New Issue
Block a user