Disabled EPerson language when sending Accept-Language header

This commit is contained in:
Giuseppe Digilio
2020-09-07 09:27:38 +02:00
parent 6feb344aa0
commit ac86976115

View File

@@ -19,7 +19,7 @@ export enum LANG_ORIGIN {
UI,
EPERSON,
BROWSER
};
}
/**
* Service to provide localization handler
@@ -75,8 +75,9 @@ export class LocaleService {
return obs$.pipe(
take(1),
flatMap(([isAuthenticated, isLoaded]) => {
let epersonLang$: Observable<string[]> = observableOf([]);
if (isAuthenticated && isLoaded) {
// TODO to enabled again when https://github.com/DSpace/dspace-angular/issues/739 will be resolved
const epersonLang$: Observable<string[]> = observableOf([]);
/* if (isAuthenticated && isLoaded) {
epersonLang$ = this.authService.getAuthenticatedUserFromStore().pipe(
take(1),
map((eperson) => {
@@ -91,7 +92,7 @@ export class LocaleService {
return languages;
})
);
}
}*/
return epersonLang$.pipe(
map((epersonLang: string[]) => {
const languages: string[] = [];