alfresco-ng2-components/docs/content-services/inherited-button.directive.md
Andy Stark 3ba72f00f8 [ADF-3551] Updates for doc review (#3784)
* [ADF-3551] Updated doc comments

* [ADF-3551] Updated doc comments

* [ADF-3551] Doc files updated with new doc comments
2018-09-13 12:59:57 +01:00

40 lines
1.2 KiB
Markdown

---
Added: v2.3.0
Status: Active
Last reviewed: 2018-09-13
---
# Inherit Permission directive
Update the current node by adding/removing the inherited permissions.
## Basic Usage
```html
<button mat-raised-button
color="primary"
adf-inherit-permission [nodeId]="nodeId"
(updated)="onUpdatedPermissions($node)">PERMISSION</button>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| nodeId | `string` | | ID of the node to add/remove inherited permissions. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs. |
| updated | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` | Emitted when the node is updated. |
## Details
This directive switches inheritance of permissions on or off depending on what is set in
the node entity. So if the node has inherited permissions, this will remove them and
vice versa. If the node does not have inherited permissions then this will add them.