mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Disable upload button with no permission (#1820)
* Add the permission check on the activiti button * Fix code after unit test * Add basic documentation
This commit is contained in:
committed by
Mario Romano
parent
721e96c01b
commit
0e4dab8b66
@@ -35,6 +35,7 @@ export class FilesComponent implements OnInit, AfterViewInit {
|
||||
fileNodeId: any;
|
||||
fileShowed: boolean = false;
|
||||
multipleFileUpload: boolean = false;
|
||||
disableWithNoPermission: boolean = false;
|
||||
folderUpload: boolean = false;
|
||||
acceptedFilesTypeShow: boolean = false;
|
||||
versioning: boolean = false;
|
||||
@@ -86,6 +87,11 @@ export class FilesComponent implements OnInit, AfterViewInit {
|
||||
return this.multipleFileUpload;
|
||||
}
|
||||
|
||||
toggleDisableWithNoPermission() {
|
||||
this.disableWithNoPermission = !this.disableWithNoPermission;
|
||||
return this.disableWithNoPermission;
|
||||
}
|
||||
|
||||
toggleFolder() {
|
||||
this.multipleFileUpload = false;
|
||||
this.folderUpload = !this.folderUpload;
|
||||
@@ -173,6 +179,10 @@ export class FilesComponent implements OnInit, AfterViewInit {
|
||||
this.notificationService.openSnackMessage(`you don't have the ${event.permission} permission to ${event.action} the ${event.type} `, 4000);
|
||||
}
|
||||
|
||||
onUploadPermissionFailed(event: any) {
|
||||
this.notificationService.openSnackMessage(`you don't have the ${event.permission} permission to ${event.action} the ${event.type} `, 4000);
|
||||
}
|
||||
|
||||
reload(event: any) {
|
||||
if (event && event.value && event.value.entry && event.value.entry.parentId) {
|
||||
if (this.documentList.currentFolderId === event.value.entry.parentId) {
|
||||
|
Reference in New Issue
Block a user