Skip to content

Commit

Permalink
Revert "[lib] Temporarily flip useIsRestoreFlowEnabled to true"
Browse files Browse the repository at this point in the history
This reverts commit 2b0ed60.
  • Loading branch information
Ashoat committed Feb 16, 2025
1 parent 6b4925d commit fb0813a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/utils/services-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

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';

// If this is true then we're using the identity service for auth. After we
// auth, the identity service gives us a CSAT, which we can use to auth with
Expand All @@ -23,7 +25,11 @@ const relyingOnAuthoritativeKeyserver = true;
// can either restore an account (primary login) or log in using the QR code
// (secondary login).
function useIsRestoreFlowEnabled(): boolean {
return true;
const isCurrentUserStaff = useIsCurrentUserStaff();
if (isDev) {
return true;
}
return isCurrentUserStaff;
}

function createHTTPAuthorizationHeader(authMetadata: AuthMetadata): string {
Expand Down

0 comments on commit fb0813a

Please sign in to comment.