Fix: completely hide upload widget if user does not have permissions (#4198)

This commit is contained in:
Marwan Khalil 2023-09-18 02:53:20 +12:00 committed by GitHub
parent 4de1cb0a09
commit 95c12c1840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
<pngx-widget-frame title="Upload new documents" i18n-title>
<pngx-widget-frame title="Upload new documents" i18n-title *pngxIfPermissions="{ action: PermissionAction.Add, type: PermissionType.Document }">
<div header-buttons>
<a *ngIf="getStatusSuccess().length > 0" (click)="dismissCompleted()" [routerLink]="[]" >
<span class="me-1" i18n="This button dismisses all status messages about processed documents on the dashboard (failed and successful)">Dismiss completed</span>
@ -9,7 +9,7 @@
</a>
</div>
<div content tourAnchor="tour.upload-widget">
<form *pngxIfPermissions="{ action: PermissionAction.Add, type: PermissionType.Document }">
<form>
<ngx-file-drop dropZoneLabel="Drop documents here or" browseBtnLabel="Browse files" (onFileDrop)="dropped($event)"
(onFileOver)="fileOver($event)" (onFileLeave)="fileLeave($event)" dropZoneClassName="bg-light card"
multiple="true" contentClassName="justify-content-center d-flex align-items-center py-5 px-2" [showBrowseBtn]=true