mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
1.7 KiB
1.7 KiB
Added, Status, Last reviewed
Added | Status | Last reviewed |
---|---|---|
v2.4.0 | Active | 2018-05-03 |
Add Permission Dialog Component
Displays a dialog to search for people or groups to add to the current node permissions.
Basic Usage
import { NodePermissionDialogService } from '@alfresco/adf-content-services';
constructor(private nodePermissionDialogService: nodePermissionDialogService) {
}
this.nodePermissionDialogService.openAddPermissionDialog(this.nodeId).subscribe((selectedNodes) => {
//action for selected nodes
},
(error) => {
this.showErrorMessage(error);
});
Details
This component extends the Add permission panel component
to apply the chosen selection of permissions when they are accepted.
You can open the dialog with the Node Permission Dialog Service. This returns Observables that
you can subscribe to for get the details of the node after the update.
Use the updateNodePermissionByDialog
from the service to update node permissions, as shown in
the following example:
import { NodePermissionDialogService } from '@alfresco/adf-content-services';
constructor(private nodePermissionDialogService: nodePermissionDialogService) {
}
this.nodePermissionDialogService.updateNodePermissionByDialog(this.nodeId).subscribe((node) => {
//updated node
},
(error) => {
this.showErrorMessage(error);
});