Skip to main content

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

HTML
<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

constructor

method(permissionsService: PermissionsService, changeDetectorRef: ChangeDetectorRef) => HasPermissionPipe

transform

method(input: string | string[]) => any

ngOnDestroy

method() =>
Was this chapter helpful?
Report Issue
Edited Feb 2, 2026·Edit this page