Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PM-3331 - TDE - Firefox - Browser extension - fix access denied error… #5984

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion libs/common/src/platform/services/config/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,23 @@ export class ConfigService implements ConfigServiceAbstraction {
const data = new ServerConfigData(response);
const serverConfig = new ServerConfig(data);
this._serverConfig.next(serverConfig);
if ((await this.authService.getAuthStatus()) === AuthenticationStatus.LoggedOut) {

const userAuthStatus = await this.authService.getAuthStatus();
if (userAuthStatus === AuthenticationStatus.LoggedOut) {
// if user is unauthenticated, then we can't set server config below
// as it is saved on an active account and there isn't one when
// the user is logged out
return serverConfig;
}

await this.stateService.setServerConfig(data);
this.environmentService.setCloudWebVaultUrl(data.environment?.cloudRegion);

// Always return new server config from server to calling method
// to ensure up to date information
// This change is specifically for the getFeatureFlag > buildServerConfig flow
// for locked or logged in users.
return serverConfig;
}
} catch {
return null;
Expand Down
Loading