mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-04 09:01:01 +01:00
[AC-1452] Restrict access to 'Organization Info' and 'Two-Step Login' settings pages with a permission check (#9483)
* Guard Organization Info route - Owners only * Guard TwoFactor route - Owners only and Organization must be able to use 2FA * Update guards to use function syntax --------- Co-authored-by: Addison Beck <hello@addisonbeck.com>
This commit is contained in:
parent
9c17878330
commit
a9abc772c2
@ -22,11 +22,21 @@ const routes: Routes = [
|
||||
canActivate: [organizationRedirectGuard(getSettingsRoute)],
|
||||
children: [], // This is required to make the auto redirect work,
|
||||
},
|
||||
{ path: "account", component: AccountComponent, data: { titleId: "organizationInfo" } },
|
||||
{
|
||||
path: "account",
|
||||
component: AccountComponent,
|
||||
canActivate: [organizationPermissionsGuard((o) => o.isOwner)],
|
||||
data: {
|
||||
titleId: "organizationInfo",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "two-factor",
|
||||
component: TwoFactorSetupComponent,
|
||||
data: { titleId: "twoStepLogin" },
|
||||
canActivate: [organizationPermissionsGuard((o) => o.use2fa && o.isOwner)],
|
||||
data: {
|
||||
titleId: "twoStepLogin",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "policies",
|
||||
|
Loading…
Reference in New Issue
Block a user