import { Roles, IUser } from '../models/index'; import { UserData } from './access-control-list/helpers.acl'; export declare class Authorizer { readonly clientId: string; readonly currentUser: IUser; readonly userDetails: UserData; constructor(currentUser: IUser, clientId: string); isAllowed(resource: any, action: string): Promise; assertAllowed(resource: any, action: string, deniedMessage?: string): Promise; /** * Check whether the user linked to this auth helper has the specified role */ hasRole(role: string, resource?: string): boolean; /** * Check whether the user linked to this auth helper has at least one of the specified roles */ hasAnyRoles(roles: Roles[], resource?: string): boolean; } export declare let authorizer: Authorizer; export declare function auth(currentUser: IUser, clientId: string): void; //# sourceMappingURL=authorizer.auth.d.ts.map