rename old hasPermission as allowableOperation and introduce the real hasPermissions (#4294)

This commit is contained in:
Eugenio Romano
2019-02-11 10:44:37 +00:00
committed by GitHub
parent 324e86aaf3
commit 3263659ac2
39 changed files with 256 additions and 178 deletions

View File

@@ -19,7 +19,7 @@
import { Directive, ElementRef, Renderer2, HostListener, Input, AfterViewInit } from '@angular/core';
import { Node } from '@alfresco/js-api';
import { PermissionsEnum, ContentService } from '@alfresco/adf-core';
import { AllowableOperationsEnum, ContentService } from '@alfresco/adf-core';
import { ContentNodeDialogService } from '../content-node-selector/content-node-dialog.service';
@Directive({
@@ -45,7 +45,7 @@ export class NodeLockDirective implements AfterViewInit {
) {}
ngAfterViewInit() {
const hasPermission = this.contentService.hasPermission(this.node, PermissionsEnum.LOCK);
this.renderer.setProperty(this.element.nativeElement, 'disabled', !hasPermission);
const hasAllowableOperations = this.contentService.hasAllowableOperations(this.node, AllowableOperationsEnum.LOCK);
this.renderer.setProperty(this.element.nativeElement, 'disabled', !hasAllowableOperations);
}
}