mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
rename old hasPermission as allowableOperation and introduce the real hasPermissions (#4294)
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
import { Component, ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { NodeEntry, Node } from '@alfresco/js-api';
|
||||
import { NodePermissionService } from '../../services/node-permission.service';
|
||||
import { NodesApiService, ContentService, PermissionsEnum } from '@alfresco/adf-core';
|
||||
import { NodesApiService, ContentService, AllowableOperationsEnum } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-add-permission',
|
||||
@@ -55,12 +55,12 @@ export class AddPermissionComponent {
|
||||
}
|
||||
|
||||
isAddEnabled(): boolean {
|
||||
return this.contentService.hasPermission(this.currentNode, PermissionsEnum.UPDATEPERMISSIONS) &&
|
||||
return this.contentService.hasAllowableOperations(this.currentNode, AllowableOperationsEnum.UPDATEPERMISSIONS) &&
|
||||
this.selectedItems.length !== 0;
|
||||
}
|
||||
|
||||
applySelection() {
|
||||
if (this.contentService.hasPermission(this.currentNode, PermissionsEnum.UPDATEPERMISSIONS)) {
|
||||
if (this.contentService.hasAllowableOperations(this.currentNode, AllowableOperationsEnum.UPDATEPERMISSIONS)) {
|
||||
this.nodePermissionService.updateNodePermissions(this.nodeId, this.selectedItems)
|
||||
.subscribe(
|
||||
(node) => {
|
||||
|
Reference in New Issue
Block a user