mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 06:43:35 +00:00
Org permission guards for accessing reports and displaying access intelligence (#15060)
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<org-switcher [filter]="orgFilter" [hideNewButton]="hideNewOrgButton$ | async"></org-switcher>
|
<org-switcher [filter]="orgFilter" [hideNewButton]="hideNewOrgButton$ | async"></org-switcher>
|
||||||
<bit-nav-group
|
<bit-nav-group
|
||||||
icon="bwi-filter"
|
icon="bwi-filter"
|
||||||
*ngIf="organization.useRiskInsights"
|
*ngIf="organization.useRiskInsights && organization.canAccessReports"
|
||||||
[text]="'accessIntelligence' | i18n"
|
[text]="'accessIntelligence' | i18n"
|
||||||
route="access-intelligence"
|
route="access-intelligence"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ const routes: Routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "access-intelligence",
|
path: "access-intelligence",
|
||||||
|
canActivate: [organizationPermissionsGuard((org) => org.canAccessReports)],
|
||||||
loadChildren: () =>
|
loadChildren: () =>
|
||||||
import("../../dirt/access-intelligence/access-intelligence.module").then(
|
import("../../dirt/access-intelligence/access-intelligence.module").then(
|
||||||
(m) => m.AccessIntelligenceModule,
|
(m) => m.AccessIntelligenceModule,
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ const routes: Routes = [
|
|||||||
{ path: "", pathMatch: "full", redirectTo: "risk-insights" },
|
{ path: "", pathMatch: "full", redirectTo: "risk-insights" },
|
||||||
{
|
{
|
||||||
path: "risk-insights",
|
path: "risk-insights",
|
||||||
canActivate: [organizationPermissionsGuard((org) => org.useRiskInsights)],
|
canActivate: [
|
||||||
|
organizationPermissionsGuard((org) => org.useRiskInsights && org.canAccessReports),
|
||||||
|
],
|
||||||
component: RiskInsightsComponent,
|
component: RiskInsightsComponent,
|
||||||
data: {
|
data: {
|
||||||
titleId: "RiskInsights",
|
titleId: "RiskInsights",
|
||||||
|
|||||||
Reference in New Issue
Block a user