import { HttpClient } from '@angular/common/http'; import { SessionService, SessionUser } from '../core/session.service'; import { Permission } from '@almedso/apis-shared'; import { ConfigService } from './config.service'; /** @brief Permission service can be queried about the permission the logged in user actually has. If there is no user logged in, no permissions are the fallback The permissions are updated whenever a user changed. or on demand. */ export declare class PermissionService { private _http; private _sessionService; private _config; private _orgId; private _userPermissions; constructor(_http: HttpClient, _sessionService: SessionService, _config: ConfigService); updatePermissions(user: SessionUser): void; clearPermissions(): void; /** * check if the user has a certain set of permissions * * @param _reqiredPermissions The list of permissions at least one must be granted * @param orgId * @returns Indication of permission grant */ canAccess(_reqiredPermissions: string[], orgId?: string): boolean; grantedPermissions(): Permission[]; }