71712: Left out the filter for authorized & metadata-export script exists to show export metadata option for now, until #635 is fixed

See https://github.com/DSpace/dspace-angular/issues/635
If uncommented now: in prod mode: button only available after refresh after login; in dev mode: button not available in any way because authorisation request header is not added to script request
This commit is contained in:
Marie Verdonck
2020-07-07 16:17:48 +02:00
parent 2f946ba2a3
commit 311d93efad

View File

@@ -380,7 +380,8 @@ export class AdminSidebarComponent extends MenuComponent implements OnInit {
this.authorizationService.isAuthorized(FeatureID.AdministratorOf), this.authorizationService.isAuthorized(FeatureID.AdministratorOf),
this.scriptDataService.scriptWithNameExistsAndCanExecute(METADATA_EXPORT_SCRIPT_NAME) this.scriptDataService.scriptWithNameExistsAndCanExecute(METADATA_EXPORT_SCRIPT_NAME)
).pipe( ).pipe(
filter(([authorized, metadataExportScriptExists]: boolean[]) => authorized && metadataExportScriptExists), // TODO uncomment when #635 (https://github.com/DSpace/dspace-angular/issues/635) is fixed; otherwise even in production mode, the metadata export button is only available after a refresh (and not in dev mode)
// filter(([authorized, metadataExportScriptExists]: boolean[]) => authorized && metadataExportScriptExists),
take(1) take(1)
).subscribe(() => { ).subscribe(() => {
this.menuService.addSection(this.menuID, { this.menuService.addSection(this.menuID, {