irisa-permission
v17.0.0
Published
permission directive
Downloads
23
Readme
permission directive
html:
export class PermissionService { public static permission_store_key = "permissions"; private static permissionCheckers: ((permission: string) => boolean)[]=[]; private static roleCheckers: ((permission: string, roles: string[]) => boolean)[]=[]; private static permissionStore: PermissionStore; private static roles: string[]; setPermissionStore(permissionStore: PermissionStore): void LoadPermissions(roles: string[]): void addRoleChecker(checker: (permission: string, roles: string[]) => boolean): void addPermissionChecker(checker: (permission: string) => boolean): void hasAccess(permission: string): boolean }
interface PermissionStore { LoadPermission(roles: string[]): Observable<string[]>; }