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