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

# Class: `abstract` HasEnablePermission

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

## Extended by

- [`FormControlHasEnablePermissionDirective`](../wiki/Class.FormControlHasEnablePermissionDirective)
- [`MatButtonHasEnablePermissionDirective`](../wiki/Class.MatButtonHasEnablePermissionDirective)
- [`MatCheckboxHasEnablePermissionDirective`](../wiki/Class.MatCheckboxHasEnablePermissionDirective)
- [`MatInputHasEnablePermissionDirective`](../wiki/Class.MatInputHasEnablePermissionDirective)
- [`MatSelectHasEnablePermissionDirective`](../wiki/Class.MatSelectHasEnablePermissionDirective)
- [`MatSlideToggleHasEnablePermissionDirective`](../wiki/Class.MatSlideToggleHasEnablePermissionDirective)

## Implements

- `OnInit`
- `OnDestroy`

## Constructors

### new HasEnablePermission()

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

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

#### Parameters

##### authorization

[`AuthorizationService`](../wiki/Class.AuthorizationService)

##### cdr

`ChangeDetectorRef`

##### scope

`null` | `string`

##### valueAccessor

`null` | `ControlValueAccessor`[]

#### Returns

[`HasEnablePermission`](../wiki/Class.HasEnablePermission)

## Properties

### cdr

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

Defined in: [has-enable-permission.ts:28](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/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/8058138ff98d9e37b711846892c79ebc45ed17d4/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/8058138ff98d9e37b711846892c79ebc45ed17d4/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/8058138ff98d9e37b711846892c79ebc45ed17d4/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/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/authorization/src/lib/has-enable-permission.ts#L64)

#### Parameters

##### disabled

`boolean`

#### Returns

`void`
