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

***

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

# Class: HasWritePermissionDirective

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

## Implements

- `OnInit`
- `OnDestroy`

## Constructors

### new HasWritePermissionDirective()

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

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

#### Parameters

##### authorization

[`AuthorizationService`](AuthorizationService.md)

##### cdr

`ChangeDetectorRef`

##### scope

`null` | `string`

#### Returns

[`HasWritePermissionDirective`](HasWritePermissionDirective.md)

## Properties

### cdr

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

Defined in: [has-write-permission.directive.ts:34](https://gitlab.com/rxap/packages/-/blob/969f0867a1da05a157f626d5bdd316bd0a67494a/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/969f0867a1da05a157f626d5bdd316bd0a67494a/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/969f0867a1da05a157f626d5bdd316bd0a67494a/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/969f0867a1da05a157f626d5bdd316bd0a67494a/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/969f0867a1da05a157f626d5bdd316bd0a67494a/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`
