alfresco-ng2-components/docs/content-services/permission-list.component.md
Andy Stark 69d8ff147e [ADF-3323] Updated doc tools to use DocFX intermediate files (#3601)
* [ADF-3323] Moved source file parsing to main doc tool

* [ADF-3323] Moved source info classes

* [ADF-3323] Added doc YAML generator tool

* [ADF-3323] Added doc YAML/JSON source paths to gitignore

* [ADF-3323] Completed templates and template context code

* [ADF-3323] Added source paths and updated type linker

* [ADF-3323] Final fixes to templates and type linking

* [ADF-3323] Fixed filter for private and protected methods

* [ADF-3323] Content services docs after check and rebuild

* [ADF-3323] Updated docbuild script in package.json
2018-08-14 15:42:25 +01:00

52 lines
1.4 KiB
Markdown

---
Added: v2.3.0
Status: Active
Last reviewed: 2018-05-03
---
# Permission List Component
Shows node permissions as a table.
![Permission List](../docassets/images/adf-permission-list.png)
## Basic Usage
```html
<adf-permission-list [nodeId]="nodeId">
</adf-permission-list>
```
If permissions list is empty, `No permissions` text is displayed,
or custom template can be added:
```html
<adf-permission-list [nodeId]="nodeId">
<adf-no-permission-template>
Custom no permission template!
</adf-no-permission-template>
</adf-permission-list>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| nodeId | `string` | "" | ID of the node whose permissions you want to show. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | |
| update | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<PermissionElement>` | Emitted when the permission is updated. |
## Details
This component uses a [Datatable component](../core/datatable.component.md) to show the
permissions retrieved from the [Node service](../core/node.service.md).
For the locally set permissions a role dropdown will be shown to let the user select a new role.
When the user selects a new value, the permission role is automatically updated and the `update` event is emitted.