UNPKG

@alfresco/adf-core

Version:
34 lines (33 loc) 1.35 kB
import { JwtHelperService } from './jwt-helper.service'; import { AppConfigService } from '../../app-config/app-config.service'; import * as i0 from "@angular/core"; export declare class UserAccessService { private jwtHelperService; private appConfigService; private globalAccess; private applicationAccess; constructor(jwtHelperService: JwtHelperService, appConfigService: AppConfigService); fetchUserAccess(): void; private fetchAccessFromRealmAccess; private fetchAccessFromHxpAuthorization; private hasRolesInRealmAccess; private hasRolesInHxpAuthorization; /** * Checks for global roles access. * * @param rolesToCheck List of the roles to check * @returns True if it contains at least one of the given roles, false otherwise */ hasGlobalAccess(rolesToCheck: string[]): boolean; private isCurrentAppKeyInToken; /** * Checks for global roles access. * * @param appName The app name * @param rolesToCheck List of the roles to check * @returns True if it contains at least one of the given roles, false otherwise */ hasApplicationAccess(appName: string, rolesToCheck: string[]): boolean; static ɵfac: i0.ɵɵFactoryDeclaration<UserAccessService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<UserAccessService>; }