1
- // FIXME: Update this file to be type safe and remove this and next line
2
- // @ts -strict-ignore
3
- import { inject , NgModule } from "@angular/core" ;
4
- import { CanMatchFn , RouterModule , Routes } from "@angular/router" ;
5
- import { map } from "rxjs" ;
1
+ import { NgModule } from "@angular/core" ;
2
+ import { RouterModule , Routes } from "@angular/router" ;
6
3
7
4
import { canAccessSettingsTab } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction" ;
8
5
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization" ;
9
- import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum" ;
10
- import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service" ;
11
6
12
7
import { organizationPermissionsGuard } from "../../organizations/guards/org-permissions.guard" ;
13
8
import { organizationRedirectGuard } from "../../organizations/guards/org-redirect.guard" ;
@@ -16,11 +11,6 @@ import { PoliciesComponent } from "../../organizations/policies";
16
11
import { AccountComponent } from "./account.component" ;
17
12
import { TwoFactorSetupComponent } from "./two-factor-setup.component" ;
18
13
19
- const removeProviderExportPermission$ : CanMatchFn = ( ) =>
20
- inject ( ConfigService )
21
- . getFeatureFlag$ ( FeatureFlag . PM11360RemoveProviderExportPermission )
22
- . pipe ( map ( ( removeProviderExport ) => removeProviderExport === true ) ) ;
23
-
24
14
const routes : Routes = [
25
15
{
26
16
path : "" ,
@@ -68,27 +58,13 @@ const routes: Routes = [
68
58
titleId : "importData" ,
69
59
} ,
70
60
} ,
71
-
72
- // Export routing is temporarily duplicated to set the flag value passed into org.canAccessExport
73
61
{
74
62
path : "export" ,
75
63
loadComponent : ( ) =>
76
64
import ( "../tools/vault-export/org-vault-export.component" ) . then (
77
65
( mod ) => mod . OrganizationVaultExportComponent ,
78
66
) ,
79
- canMatch : [ removeProviderExportPermission$ ] , // if this matches, the flag is ON
80
- canActivate : [ organizationPermissionsGuard ( ( org ) => org . canAccessExport ( true ) ) ] ,
81
- data : {
82
- titleId : "exportVault" ,
83
- } ,
84
- } ,
85
- {
86
- path : "export" ,
87
- loadComponent : ( ) =>
88
- import ( "../tools/vault-export/org-vault-export.component" ) . then (
89
- ( mod ) => mod . OrganizationVaultExportComponent ,
90
- ) ,
91
- canActivate : [ organizationPermissionsGuard ( ( org ) => org . canAccessExport ( false ) ) ] ,
67
+ canActivate : [ organizationPermissionsGuard ( ( org ) => org . canAccessExport ) ] ,
92
68
data : {
93
69
titleId : "exportVault" ,
94
70
} ,
@@ -118,7 +94,8 @@ function getSettingsRoute(organization: Organization) {
118
94
if ( organization . canManageDeviceApprovals ) {
119
95
return "device-approvals" ;
120
96
}
121
- return undefined ;
97
+
98
+ return "/" ;
122
99
}
123
100
124
101
@NgModule ( {
0 commit comments