Skip to content

Commit d959a28

Browse files
authored
Merge pull request #3305 from DSpace/backport-3011-to-dspace-8_x
[Port dspace-8_x] Fixed page and admin menu for Shibboleth auth
2 parents 2578500 + 9d98d1a commit d959a28

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/modules/app/browser-init.service.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ import { AppState } from '../../app/app.reducer';
3232
import { BreadcrumbsService } from '../../app/breadcrumbs/breadcrumbs.service';
3333
import { AuthService } from '../../app/core/auth/auth.service';
3434
import { coreSelector } from '../../app/core/core.selectors';
35+
import { RequestService } from '../../app/core/data/request.service';
3536
import { RootDataService } from '../../app/core/data/root-data.service';
3637
import { LocaleService } from '../../app/core/locale/locale.service';
3738
import { HeadTagService } from '../../app/core/metadata/head-tag.service';
39+
import { HALEndpointService } from '../../app/core/shared/hal-endpoint.service';
3840
import { CorrelationIdService } from '../../app/correlation-id/correlation-id.service';
3941
import { InitService } from '../../app/init.service';
4042
import { KlaroService } from '../../app/shared/cookies/klaro.service';
@@ -81,6 +83,9 @@ export class BrowserInitService extends InitService {
8183
protected menuService: MenuService,
8284
private rootDataService: RootDataService,
8385
protected router: Router,
86+
private requestService: RequestService,
87+
private halService: HALEndpointService,
88+
8489
) {
8590
super(
8691
store,
@@ -169,17 +174,15 @@ export class BrowserInitService extends InitService {
169174
}
170175

171176
/**
172-
* During an external authentication flow invalidate the SSR transferState
177+
* During an external authentication flow invalidate the
173178
* data in the cache. This allows the app to fetch fresh content.
174179
* @private
175180
*/
176181
private externalAuthCheck() {
177-
178182
this.sub = this.authService.isExternalAuthentication().pipe(
179183
filter((externalAuth: boolean) => externalAuth),
180184
).subscribe(() => {
181-
// Clear the transferState data.
182-
this.rootDataService.invalidateRootCache();
185+
this.requestService.setStaleByHrefSubstring(this.halService.getRootHref());
183186
this.authService.setExternalAuthStatus(false);
184187
},
185188
);

0 commit comments

Comments
 (0)