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:
parent
4561fbfa6b
commit
997ee5c43c
@ -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",
|
||||
|
@ -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 },
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user