1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-08 19:18:02 +01:00

PM-1049 - Apply same guards as in web to login-decryption-options in desktop & browser.

This commit is contained in:
Jared Snider 2023-06-10 15:05:25 -04:00
parent 4561fbfa6b
commit 997ee5c43c
No known key found for this signature in database
GPG Key ID: A149DDD612516286
2 changed files with 6 additions and 2 deletions

View File

@ -4,6 +4,8 @@ import { ActivatedRouteSnapshot, RouteReuseStrategy, RouterModule, Routes } from
import { AuthGuard } from "@bitwarden/angular/auth/guards/auth.guard";
import { LockGuard } from "@bitwarden/angular/auth/guards/lock.guard";
import { UnauthGuard } from "@bitwarden/angular/auth/guards/unauth.guard";
import { canAccessFeature } from "@bitwarden/angular/guard/feature-flag.guard";
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
import { EnvironmentComponent } from "../auth/popup/environment.component";
import { HintComponent } from "../auth/popup/hint.component";
@ -97,7 +99,7 @@ const routes: Routes = [
{
path: "login-initiated",
component: LoginDecryptionOptionsComponent,
canActivate: [], // TODO: put UnauthGuard back
canActivate: [LockGuard, canAccessFeature(FeatureFlag.TrustedDeviceEncryption)],
},
{
path: "sso",

View File

@ -3,6 +3,8 @@ import { RouterModule, Routes } from "@angular/router";
import { AuthGuard } from "@bitwarden/angular/auth/guards/auth.guard";
import { LockGuard } from "@bitwarden/angular/auth/guards/lock.guard";
import { canAccessFeature } from "@bitwarden/angular/guard/feature-flag.guard";
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
import { AccessibilityCookieComponent } from "../auth/accessibility-cookie.component";
import { LoginGuard } from "../auth/guards/login.guard";
@ -41,7 +43,7 @@ const routes: Routes = [
{
path: "login-initiated",
component: LoginDecryptionOptionsComponent,
canActivate: [], // TODO: do I need an unauth guard like web?
canActivate: [LockGuard, canAccessFeature(FeatureFlag.TrustedDeviceEncryption)],
},
{ path: "register", component: RegisterComponent },
{