packages/eui/packages/components/directives/eui-has-permission.directive.ts
A structural directive that conditionally renders content based on user permissions. Similar to *ngIf, but checks against a permission service to determine visibility.
Example :```HTML
<!-- Single permission check -->
<div *euiHasPermission="['READ_USERS']">
Content only visible to users with READ_USERS permission
</div>
The directive performs an AND operation when multiple permissions are provided, meaning all permissions must be granted for the content to be displayed.
Selector | [euiHasPermission] |
Inputs |
Accessors |
euiHasPermission |
Type : any
|
euiHasPermission | ||||||
seteuiHasPermission(val)
|
||||||
Sets the permissions required to display the content. Can be a single permission string or an array of permission strings.
Parameters :
Returns :
void
|