mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
fix(auth-guard): [PM-22822] remove SsoNewJitProvisionedUser case (#15376)
This commit is contained in:
@@ -127,7 +127,6 @@ describe("AuthGuard", () => {
|
|||||||
describe("given user is Unlocked", () => {
|
describe("given user is Unlocked", () => {
|
||||||
describe("given the PM16117_SetInitialPasswordRefactor feature flag is ON", () => {
|
describe("given the PM16117_SetInitialPasswordRefactor feature flag is ON", () => {
|
||||||
const tests = [
|
const tests = [
|
||||||
ForceSetPasswordReason.SsoNewJitProvisionedUser,
|
|
||||||
ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission,
|
ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission,
|
||||||
ForceSetPasswordReason.TdeOffboarding,
|
ForceSetPasswordReason.TdeOffboarding,
|
||||||
];
|
];
|
||||||
@@ -167,10 +166,6 @@ describe("AuthGuard", () => {
|
|||||||
|
|
||||||
describe("given the PM16117_SetInitialPasswordRefactor feature flag is OFF", () => {
|
describe("given the PM16117_SetInitialPasswordRefactor feature flag is OFF", () => {
|
||||||
const tests = [
|
const tests = [
|
||||||
{
|
|
||||||
reason: ForceSetPasswordReason.SsoNewJitProvisionedUser,
|
|
||||||
url: "/set-password-jit",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
reason: ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission,
|
reason: ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission,
|
||||||
url: "/set-password",
|
url: "/set-password",
|
||||||
|
|||||||
@@ -67,16 +67,6 @@ export const authGuard: CanActivateFn = async (
|
|||||||
FeatureFlag.PM16117_ChangeExistingPasswordRefactor,
|
FeatureFlag.PM16117_ChangeExistingPasswordRefactor,
|
||||||
);
|
);
|
||||||
|
|
||||||
// User JIT provisioned into a master-password-encryption org
|
|
||||||
if (
|
|
||||||
forceSetPasswordReason === ForceSetPasswordReason.SsoNewJitProvisionedUser &&
|
|
||||||
!routerState.url.includes("set-password-jit") &&
|
|
||||||
!routerState.url.includes("set-initial-password")
|
|
||||||
) {
|
|
||||||
const route = isSetInitialPasswordFlagOn ? "/set-initial-password" : "/set-password-jit";
|
|
||||||
return router.createUrlTree([route]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TDE org user has "manage account recovery" permission
|
// TDE org user has "manage account recovery" permission
|
||||||
if (
|
if (
|
||||||
forceSetPasswordReason ===
|
forceSetPasswordReason ===
|
||||||
|
|||||||
Reference in New Issue
Block a user