Skip to content

Commit

Permalink
[lib] Turn the flag on for dev
Browse files Browse the repository at this point in the history
Summary:
In D14265 we made this flag true for all the staff users, but by mistake this resulted in turning this flag off for the dev users.

https://linear.app/comm/issue/ENG-10127/logging-out-on-the-web-results-in-an-error

Test Plan: Check if the proper login layout is shown on dev.

Reviewers: kamil, bartek

Reviewed By: kamil, bartek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D14284
  • Loading branch information
palys-swm committed Jan 30, 2025
1 parent 4a832bd commit c533bbe
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/utils/services-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import base64 from 'base-64';

import { isDev } from './dev-utils.js';
import { getMessageForException } from './errors.js';
import type { AuthMetadata } from '../shared/identity-client-context.js';
import { useIsCurrentUserStaff } from '../shared/staff-utils.js';
Expand All @@ -23,7 +24,13 @@ const relyingOnAuthoritativeKeyserver = true;
// If this returns true, then we're using the login 2.0, which means that a user
// can either restore an account (primary login) or log in using the QR code
// (secondary login).
const useIsRestoreFlowEnabled = useIsCurrentUserStaff;
function useIsRestoreFlowEnabled(): boolean {
const isCurrentUserStaff = useIsCurrentUserStaff();
if (isDev) {
return true;
}
return isCurrentUserStaff;
}

function createHTTPAuthorizationHeader(authMetadata: AuthMetadata): string {
// explicit destructure to make it future-proof
Expand Down

0 comments on commit c533bbe

Please sign in to comment.