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

# Class: HasWritePermissionDirective

Defined in: [has-write-permission.directive.ts:20](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/authorization/src/lib/has-write-permission.directive.ts#L20)

## Implements

- `OnInit`
- `OnDestroy`

## Constructors

### new HasWritePermissionDirective()

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

Defined in: [has-write-permission.directive.ts:30](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/authorization/src/lib/has-write-permission.directive.ts#L30)

#### Parameters

##### authorization

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

##### cdr

`ChangeDetectorRef`

##### scope

`null` | `string`

#### Returns

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

## Properties

### cdr

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

Defined in: [has-write-permission.directive.ts:34](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/authorization/src/lib/has-write-permission.directive.ts#L34)

***

### identifier

> **identifier**: `string`

Defined in: [has-write-permission.directive.ts:25](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/authorization/src/lib/has-write-permission.directive.ts#L25)

***

### readonly

> **readonly**: `boolean` = `false`

Defined in: [has-write-permission.directive.ts:27](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/authorization/src/lib/has-write-permission.directive.ts#L27)

## Methods

### ngOnDestroy()

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

Defined in: [has-write-permission.directive.ts:53](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/authorization/src/lib/has-write-permission.directive.ts#L53)

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-write-permission.directive.ts:41](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/authorization/src/lib/has-write-permission.directive.ts#L41)

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`
