mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-19 20:51:35 +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)],
|
canActivate: [organizationRedirectGuard(getSettingsRoute)],
|
||||||
children: [], // This is required to make the auto redirect work,
|
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",
|
path: "two-factor",
|
||||||
component: TwoFactorSetupComponent,
|
component: TwoFactorSetupComponent,
|
||||||
data: { titleId: "twoStepLogin" },
|
canActivate: [organizationPermissionsGuard((o) => o.use2fa && o.isOwner)],
|
||||||
|
data: {
|
||||||
|
titleId: "twoStepLogin",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "policies",
|
path: "policies",
|
||||||
|
Loading…
Reference in New Issue
Block a user