alfresco-ng2-components/docs/content-services/permission-list.component.md
Andy Stark 4b68c98007 [ADF-3801] Added source linking tool and updated content services docs (#4037)
* [ADF-3801] Added source linking tool

* [ADF-3801] Added source links to doc files
2018-11-30 11:59:36 +00:00

55 lines
1.7 KiB
Markdown

---
Title: Permission List Component
Added: v2.3.0
Status: Active
Last reviewed: 2018-11-20
---
# [Permission List Component](../../lib/content-services/permission-manager/components/permission-list/permission-list.component.ts "Defined in permission-list.component.ts")
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>
```
### [Transclusions](../user-guide/transclusion.md)
When the list is empty, the contents will simply say "No permissions" by default,
but you can also supply your own content:
```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>` | Emitted when an error occurs. |
| 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.