mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 22:13:02 +00:00
Merge remote-tracking branch 'remotes/origin/master' into mydspace
# Conflicts: # src/app/core/data/base-response-parsing.service.ts # src/app/core/data/request.service.ts
This commit is contained in:
@@ -130,14 +130,10 @@ export class AuthService {
|
||||
headers = headers.append('Authorization', `Bearer ${token.accessToken}`);
|
||||
options.headers = headers;
|
||||
return this.authRequestService.getRequest('status', options).pipe(
|
||||
map((status) => this.rdbService.build(status)),
|
||||
switchMap((status: AuthStatus) => {
|
||||
|
||||
if (status.authenticated) {
|
||||
// TODO this should be cleaned up, AuthStatus could be parsed by the RemoteDataService as a whole...
|
||||
// Review when https://jira.duraspace.org/browse/DS-4006 is fixed
|
||||
// See https://github.com/DSpace/dspace-angular/issues/292
|
||||
const person$ = this.rdbService.buildSingle<EPerson>(status.eperson.toString());
|
||||
return person$.pipe(map((eperson) => eperson.payload));
|
||||
return status.eperson.pipe(map((eperson) => eperson.payload));
|
||||
} else {
|
||||
throw(new Error('Not authenticated'));
|
||||
}
|
||||
@@ -226,7 +222,6 @@ export class AuthService {
|
||||
throw(new Error('auth.errors.invalid-user'));
|
||||
}
|
||||
}))
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user