[ACA-1529] performance fixes for permission checks (#498)

* fix recent files

* fix files component

* fix shared files

* don't evaluate permissions for empty selection

* fix info drawer

* fix viewer

* fix tests

* reduce one more check

* track upload errors on app level

* remove console log

* reduce service dependencies
This commit is contained in:
Denys Vuika
2018-07-08 12:25:20 +01:00
committed by GitHub
parent fe683015c5
commit 718a32a907
23 changed files with 171 additions and 151 deletions

View File

@@ -77,7 +77,7 @@
<button
mat-menu-item
*ngIf="permission.check(selection.nodes, ['delete'], { target: 'allowableOperationsOnTarget' })"
*ngIf="canDeleteShared"
[acaMoveNode]="selection.nodes">
<mat-icon>library_books</mat-icon>
<span>{{ 'APP.ACTIONS.MOVE' | translate }}</span>
@@ -85,7 +85,7 @@
<button
mat-menu-item
*ngIf="permission.check(selection.nodes, ['delete'])"
*ngIf="canDelete"
[acaUnshareNode]="selection.nodes">
<mat-icon>stop_screen_share</mat-icon>
<span>{{ 'APP.ACTIONS.UNSHARE' | translate }}</span>
@@ -93,7 +93,7 @@
<button
mat-menu-item
*ngIf="permission.check(selection.nodes, ['delete'], { target: 'allowableOperationsOnTarget' })"
*ngIf="canDeleteShared"
[acaDeleteNode]="selection.nodes">
<mat-icon>delete</mat-icon>
<span>{{ 'APP.ACTIONS.DELETE' | translate }}</span>
@@ -101,7 +101,7 @@
<button
mat-menu-item
*ngIf="selection.file && permission.check(selection.file, ['update'], { target: 'allowableOperationsOnTarget' })"
*ngIf="canUpdateShared"
[acaNodeVersions]="selection.file">
<mat-icon>history</mat-icon>
<span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span>