0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed more tests

refs 8630be5a87

- referenced commit skipped current user and proxy service population when `skipAuthSuccessHandler` was set but the population is needed during setup
- `skipAuthSuccessHandler` is used for skipping the post-authentication transition rather than skipping all post-auth behaviour so the the post-auth behaviour was reintroduced but put in a guard so we don't try to do it again when it's already been run
This commit is contained in:
Kevin Ansfield 2021-07-14 13:15:59 +01:00
parent a7dc63cfab
commit 9bc799258d

View file

@ -56,11 +56,7 @@ export default class SessionService extends ESASessionService {
}
async handleAuthentication() {
if (this.skipAuthSuccessHandler) {
this.skipAuthSuccessHandler = false;
return;
}
if (!this.user) {
try {
await this.populateUser();
} catch (err) {
@ -68,6 +64,12 @@ export default class SessionService extends ESASessionService {
}
await this.postAuthPreparation();
}
if (this.skipAuthSuccessHandler) {
this.skipAuthSuccessHandler = false;
return;
}
super.handleAuthentication('home');
}