# EuiHasPermissionDirective

**Type:** directive



A structural directive that conditionally renders content based on user permissions.
Similar to *ngIf, but checks against a permission service to determine visibility.

```html
```HTML
<!-- Single permission check -->
<div *euiHasPermission="['READ_USERS']">
  Content only visible to users with READ_USERS permission
</div>
```
<!-- Multiple permission check (AND operation) -->
<div *euiHasPermission="['READ_USERS', 'WRITE_USERS']">
  Content only visible to users with both permissions
</div>

<!-- Using OR operator -->
<div *euiHasPermission="['READ_USERS', 'WRITE_USERS']" operator='OR'">
	Content visible to users with either 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
- **euiHasPermission**: `any` - 
- **euiHasPermissionOperator**: `ConditionOperator` - Sets the logical operator for permission checks. Can be 'AND' (default) or 'OR'. - 'AND': All permissions must be granted to display the content. - 'OR': At least one permission must be granted to display the content.
