[**@rxap/authorization**](../README.md)

***

[@rxap/authorization](../globals.md) / HasEnablePermission

# Class: `abstract` HasEnablePermission

Defined in: [has-enable-permission.ts:19](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/authorization/src/lib/has-enable-permission.ts#L19)

## Extended by

- [`FormControlHasEnablePermissionDirective`](FormControlHasEnablePermissionDirective.md)
- [`MatButtonHasEnablePermissionDirective`](MatButtonHasEnablePermissionDirective.md)
- [`MatCheckboxHasEnablePermissionDirective`](MatCheckboxHasEnablePermissionDirective.md)
- [`MatInputHasEnablePermissionDirective`](MatInputHasEnablePermissionDirective.md)
- [`MatSelectHasEnablePermissionDirective`](MatSelectHasEnablePermissionDirective.md)
- [`MatSlideToggleHasEnablePermissionDirective`](MatSlideToggleHasEnablePermissionDirective.md)

## Implements

- `OnInit`
- `OnDestroy`

## Constructors

### new HasEnablePermission()

> **new HasEnablePermission**(`authorization`, `cdr`, `scope`, `valueAccessor`): [`HasEnablePermission`](HasEnablePermission.md)

Defined in: [has-enable-permission.ts:24](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/authorization/src/lib/has-enable-permission.ts#L24)

#### Parameters

##### authorization

[`AuthorizationService`](AuthorizationService.md)

##### cdr

`ChangeDetectorRef`

##### scope

`null` | `string`

##### valueAccessor

`null` | `ControlValueAccessor`[]

#### Returns

[`HasEnablePermission`](HasEnablePermission.md)

## Properties

### cdr

> `protected` `readonly` **cdr**: `ChangeDetectorRef`

Defined in: [has-enable-permission.ts:28](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/authorization/src/lib/has-enable-permission.ts#L28)

***

### identifier

> **identifier**: `string`

Defined in: [has-enable-permission.ts:20](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/authorization/src/lib/has-enable-permission.ts#L20)

## Methods

### ngOnDestroy()

> **ngOnDestroy**(): `void`

Defined in: [has-enable-permission.ts:60](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/authorization/src/lib/has-enable-permission.ts#L60)

A callback method that performs custom clean-up, invoked immediately
before a directive, pipe, or service instance is destroyed.

#### Returns

`void`

#### Implementation of

`OnDestroy.ngOnDestroy`

***

### ngOnInit()

> **ngOnInit**(): `void`

Defined in: [has-enable-permission.ts:39](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/authorization/src/lib/has-enable-permission.ts#L39)

A callback method that is invoked immediately after the
default change detector has checked the directive's
data-bound properties for the first time,
and before any of the view or content children have been checked.
It is invoked only once when the directive is instantiated.

#### Returns

`void`

#### Implementation of

`OnInit.ngOnInit`

***

### setDisabled()

> `abstract` **setDisabled**(`disabled`): `void`

Defined in: [has-enable-permission.ts:64](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/packages/angular/authorization/src/lib/has-enable-permission.ts#L64)

#### Parameters

##### disabled

`boolean`

#### Returns

`void`
