Skip to content

Commit 50be5bd

Browse files
author
Salim Terres
committed
Bug #14397 - [Ingest] – The inter-app link is missing when the user is associated with a profile group that does not allow access to the Search app.
1 parent aef96fe commit 50be5bd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ui/ui-frontend/projects/ingest/src/app/ingest/ingest-preview/ingest-information-tab/ingest-information-tab.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ import {
4646
} from '../../../models/logbook-event.interface';
4747

4848
import { ApplicationId, ApplicationService } from 'vitamui-library';
49-
import { Observable } from 'rxjs';
50-
import { map } from 'rxjs/operators';
49+
import { Observable, of } from 'rxjs';
50+
import { catchError, map } from 'rxjs/operators';
5151

5252
@Component({
5353
selector: 'app-ingest-information-tab',
@@ -118,8 +118,9 @@ export class IngestInformationTabComponent implements OnChanges {
118118
}
119119

120120
getOpiUrl$(): Observable<string> {
121-
return this.applicationService
122-
.getUrl$({ appId: ApplicationId.ARCHIVE_SEARCH_APP })
123-
.pipe(map((appUrl) => `${appUrl}?guidopi=${this.ingest.id}`));
121+
return this.applicationService.getUrl$({ appId: ApplicationId.ARCHIVE_SEARCH_APP }).pipe(
122+
map((appUrl) => `${appUrl}?guidopi=${this.ingest.id}`),
123+
catchError(() => of('/')),
124+
);
124125
}
125126
}

0 commit comments

Comments
 (0)