File

packages/eui/packages/components/directives/eui-has-permission.directive.ts

Description

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>
Content only visible to users with both permissions
```

The directive performs an AND operation when multiple permissions are provided, meaning all permissions must be granted for the content to be displayed.

Metadata

Index

Inputs
Accessors

Inputs

euiHasPermission
Type : any

Accessors

euiHasPermission
seteuiHasPermission(val)

Sets the permissions required to display the content. Can be a single permission string or an array of permission strings.

Parameters :
Name Optional Description
val No
  • Permission or array of permissions to check
Returns : void

results matching ""

    No results matching ""