libs/acl/src/lib/acl-engine/types.ts
This is our main agreement on how to consume acl in an application.
Properties |
Methods |
canEdit | ||||||
canEdit(aclPath: string)
|
||||||
Defined in libs/acl/src/lib/acl-engine/types.ts:48
|
||||||
Parameters :
Returns :
boolean
|
canEdit$ | ||||||
canEdit$(aclPath: string)
|
||||||
Defined in libs/acl/src/lib/acl-engine/types.ts:49
|
||||||
Parameters :
Returns :
Observable<boolean>
|
canShow | ||||||
canShow(aclPath: string)
|
||||||
Defined in libs/acl/src/lib/acl-engine/types.ts:42
|
||||||
Parameters :
Returns :
boolean
|
canShow$ | ||||||
canShow$(aclPath: string)
|
||||||
Defined in libs/acl/src/lib/acl-engine/types.ts:46
|
||||||
Parameters :
Returns :
Observable<boolean>
|
isDisabled | ||||||
isDisabled(aclPath: string)
|
||||||
Defined in libs/acl/src/lib/acl-engine/types.ts:54
|
||||||
Parameters :
Returns :
boolean
|
isDisabled$ | ||||||
isDisabled$(aclPath: string)
|
||||||
Defined in libs/acl/src/lib/acl-engine/types.ts:55
|
||||||
Parameters :
Returns :
Observable<boolean>
|
isHidden | ||||||
isHidden(aclPath: string)
|
||||||
Defined in libs/acl/src/lib/acl-engine/types.ts:57
|
||||||
Parameters :
Returns :
boolean
|
isHidden$ | ||||||
isHidden$(aclPath: string)
|
||||||
Defined in libs/acl/src/lib/acl-engine/types.ts:58
|
||||||
Parameters :
Returns :
Observable<boolean>
|
isReadonly | ||||||
isReadonly(aclPath: string)
|
||||||
Defined in libs/acl/src/lib/acl-engine/types.ts:51
|
||||||
Parameters :
Returns :
boolean
|
isReadonly$ | ||||||
isReadonly$(aclPath: string)
|
||||||
Defined in libs/acl/src/lib/acl-engine/types.ts:52
|
||||||
Parameters :
Returns :
Observable<boolean>
|
unscoped | |
Type |
AclEvaluationInterface
|
import { Observable } from 'rxjs';
export const aclResourceStates = ['hidden', 'readonly', 'disabled'] as const;
export type AclResourceState = (typeof aclResourceStates)[number];
export const aclResetStates = ['visible', 'editable'] as const;
export type AclResetState = (typeof aclResetStates)[number];
export const aclRuleStates = [...aclResetStates, ...aclResourceStates] as const;
export type AclRuleState = AclResetState | AclResourceState;
export interface AclRule {
active: boolean;
path: string;
condition: string;
state: AclRuleState;
defaultRule: boolean;
dynamicFormRule?: boolean;
}
export interface AclDecision {
path: string;
state: AclRuleState;
decision: boolean;
timestamp: number;
}
export interface ExpressionStoreAdapter {
readonly dataChanged$: Observable<unknown>;
queryStoreValue(path: string): unknown;
}
/**
* This is our main agreement on how to consume acl in an application.
*/
export interface AclEvaluationInterface {
readonly unscoped: AclEvaluationInterface;
/**
* @deprecated
*/
canShow(aclPath: string): boolean;
/**
* @deprecated
*/
canShow$(aclPath: string): Observable<boolean>;
canEdit(aclPath: string): boolean;
canEdit$(aclPath: string): Observable<boolean>;
isReadonly(aclPath: string): boolean;
isReadonly$(aclPath: string): Observable<boolean>;
isDisabled(aclPath: string): boolean;
isDisabled$(aclPath: string): Observable<boolean>;
isHidden(aclPath: string): boolean;
isHidden$(aclPath: string): Observable<boolean>;
}