mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2432] created directive for add/remove inherited permissions (#3111)
* [ADF-2432] permission display component - phase 1 * [ADF-2432] display permission table for node - phase 2 * [ADF-2432] fixed layout for display permissions * [ADF-2432] added test and documentation for permission display * [ADF-2432] fixed wrong rebase changes * [ADF-2432] created directive for add/remove inherited permissions * [ADF-2432] renamed folder and added inheriting directive * [ADF-2432] removed old documentation * [ADF-2432] added async to tests
This commit is contained in:
@@ -1,2 +1,11 @@
|
||||
<adf-permission-list [nodeId]="nodeId">
|
||||
</adf-permission-list>
|
||||
<div class="inherit_permission_button">
|
||||
<button mat-raised-button
|
||||
color="primary"
|
||||
adf-inherit-permission [nodeId]="nodeId"
|
||||
(updated)="onUpdatedPermissions($node)">{{'DEMO_PERMISSION.INHERIT_PERMISSION_BUTTON' | translate}}</button>
|
||||
</div>
|
||||
<div>
|
||||
<adf-permission-list [nodeId]="nodeId">
|
||||
</adf-permission-list>
|
||||
</div>
|
||||
|
||||
|
@@ -0,0 +1,6 @@
|
||||
.inherit_permission_button {
|
||||
padding-top: 20px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
@@ -15,8 +15,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, Optional, OnInit } from '@angular/core';
|
||||
import { Component, Optional, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Params} from '@angular/router';
|
||||
import { PermissionListComponent } from '@alfresco/adf-content-services';
|
||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
|
||||
@Component({
|
||||
selector: 'app-permissions',
|
||||
@@ -25,6 +27,9 @@ import { ActivatedRoute, Params} from '@angular/router';
|
||||
})
|
||||
export class DemoPermissionComponent implements OnInit {
|
||||
|
||||
@ViewChild(PermissionListComponent)
|
||||
displayPermissionComponent: PermissionListComponent;
|
||||
|
||||
nodeId: string;
|
||||
|
||||
constructor(@Optional() private route: ActivatedRoute) {
|
||||
@@ -40,4 +45,8 @@ export class DemoPermissionComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
onUpdatedPermissions(node: MinimalNodeEntryEntity) {
|
||||
this.displayPermissionComponent.reload();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user