HasPermissionPipe
HasPermissionPipe
A pipe which checks the provided permission against all the permissions of the current user.
Returns true
if the current user has that permission.
Example
<button [disabled]="!('UpdateCatalog' | hasPermission)">Save Changes</button>
Signature
class HasPermissionPipe implements PipeTransform, OnDestroy {
constructor(permissionsService: PermissionsService, changeDetectorRef: ChangeDetectorRef)
transform(input: string | string[]) => any;
ngOnDestroy() => ;
}
- Implements:
PipeTransform
,OnDestroy