eduit
This commit is contained in:
@ -18,20 +18,23 @@ import { BaseService, EAUserService } from '@shared';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
const auths = ['YUNLI-CART-SEARCH', 'YUNLI-CART-DAOC1HU', 'YUNLI-CART-DETAIL','YUNLI-CART-AUDIT-SEARCH'];
|
||||
const auths = ['YUNLI-CART-SEARCH', 'YUNLI-CART-DAOC1HU', 'YUNLI-CART-DETAIL', 'YUNLI-CART-AUDIT-SEARCH'];
|
||||
|
||||
@Injectable()
|
||||
export class AuthGuard implements CanActivate, CanActivateChild, CanLoad {
|
||||
constructor(private srv: ACLService, router: Router, private baseService: BaseService, private menuService: MenuService) {}
|
||||
canLoad(route: Route, segments: UrlSegment[]): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree> {
|
||||
console.log(route);
|
||||
return true;
|
||||
}
|
||||
|
||||
canActivate(route: ActivatedRouteSnapshot, _state: RouterStateSnapshot | null): Observable<boolean> {
|
||||
console.log(route);
|
||||
return this.handle();
|
||||
}
|
||||
|
||||
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {
|
||||
console.log(childRoute);
|
||||
return this.handle();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user