[AAE-3966] FE - Disable the upload button when the user doesn't have permissions in a folder (#6304)

* [AAE-3966] FE - Disable the upload button when the user doesn't have permissions in a folder

* * Handled both error messages while searching

* * Refactored names

* * Fixed unit tests and added some * Updated doc

* * Fixed comment
This commit is contained in:
siva kumar
2020-11-04 14:35:55 +05:30
committed by GitHub
parent 64ad7923c3
commit b8cacd3b4e
7 changed files with 130 additions and 44 deletions

View File

@@ -213,6 +213,10 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
@Output()
showingSearch: EventEmitter<boolean> = new EventEmitter<boolean>();
/** Emitted when current folder loaded. */
@Output()
currentFolder: EventEmitter<Node> = new EventEmitter<Node>();
@ViewChild('documentList', { static: true })
documentList: DocumentListComponent;
@@ -314,6 +318,12 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
this.onFileUploadEvent();
this.resetPagination();
this.setSearchScopeToNodes();
this.documentList.$folderNode
.pipe(takeUntil(this.onDestroy$))
.subscribe((currentNode: Node) => {
this.currentFolder.emit(currentNode);
});
}
ngOnDestroy() {