[ADF-2551] removed wrong check before checking permissions (#3163)

* [ADF-2551] removed wrong check before checking permissions

* [ADF-2551] fixed disablewithnopermission value for content actions

* [ADF-2551] fixed tests titles

* [ADF-2551] removed disabled tslint rule

* [ADF-2551] removed duplicated wrong tests
This commit is contained in:
Vito
2018-04-17 20:23:44 +01:00
committed by Eugenio Romano
parent cebe0f57f5
commit 21ad4c2894
2 changed files with 49 additions and 45 deletions

View File

@@ -441,7 +441,7 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
}
disableActionsWithNoPermissions(node: MinimalNodeEntity, action: ContentActionModel) {
if (action.permission && node.entry.allowableOperations && !this.contentService.hasPermission(node.entry, action.permission)) {
if (action.permission && action.disableWithNoPermission && !this.contentService.hasPermission(node.entry, action.permission)) {
action.disabled = true;
}
}