2018-06-05 05:10:41 +02:00
|
|
|
import { NgModule } from "@angular/core";
|
2022-07-13 18:22:58 +02:00
|
|
|
import { Route, RouterModule, Routes } from "@angular/router";
|
2018-06-05 05:10:41 +02:00
|
|
|
|
2023-02-06 22:53:37 +01:00
|
|
|
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";
|
2018-06-08 23:08:19 +02:00
|
|
|
|
[AC-1011] Admin Console / Billing code ownership (#4973)
* refactor: move SCIM component to admin-console, refs EC-1011
* refactor: move scimProviderType to admin-console, refs EC-1011
* refactor: move scim-config.api to admin-console, refs EC-1011
* refactor: create models folder and nest existing api contents, refs EC-1011
* refactor: move scim-config to admin-console models, refs EC-1011
* refactor: move billing.component to billing, refs EC-1011
* refactor: remove nested app folder from new billing structure, refs EC-1011
* refactor: move organizations/billing to billing, refs EC-1011
* refactor: move add-credit and adjust-payment to billing/settings, refs EC-1011
* refactor: billing history/sync to billing, refs EC-1011
* refactor: move org plans, payment/method to billing/settings, refs EC-1011
* fix: update legacy file paths for payment-method and tax-info, refs EC-1011
* fix: update imports for scim component, refs EC-1011
* refactor: move subscription and tax-info into billing, refs EC-1011
* refactor: move user-subscription to billing, refs EC-1011
* refactor: move images/cards to billing and update base path, refs EC-1011
* refactor: move payment-method, plan subscription, and plan to billing, refs EC-1011
* refactor: move transaction-type to billing, refs EC-1011
* refactor: move billing-sync-config to billing, refs EC-1011
* refactor: move billing-sync and bit-pay-invoice request to billing, refs EC-1011
* refactor: move org subscription and tax info update requests to billing, refs EC-1011
* fix: broken paths to billing, refs EC-1011
* refactor: move payment request to billing, refs EC-1011
* fix: update remaining imports for payment-request, refs EC-1011
* refactor: move tax-info-update to billing, refs EC-1011
* refactor: move billing-payment, billing-history, and billing responses to billing, refs EC-1011
* refactor: move organization-subscription-responset to billing, refs EC-1011
* refactor: move payment and plan responses to billing, refs EC-1011
* refactor: move subscription response to billing ,refs EC-1011
* refactor: move tax info and rate responses to billing, refs EC-1011
* fix: update remaining path to base response for tax-rate response, refs EC-1011
* refactor: (browser) move organization-service to admin-console, refs EC-1011
* refactor: (browser) move organizaiton-service to admin-console, refs EC-1011
* refactor: (cli) move share command to admin-console, refs EC-1011
* refactor: move organization-collect request model to admin-console, refs EC-1011
* refactor: (web) move organization, collection/user responses to admin-console, refs EC-1011
* refactor: (cli) move selection-read-only to admin-console, refs EC-1011
* refactor: (desktop) move organization-filter to admin-console, refs EC-1011
* refactor: (web) move organization-switcher to admin-console, refs EC-1011
* refactor: (web) move access-selector to admin-console, refs EC-1011
* refactor: (web) move create folder to admin-console, refs EC-1011
* refactor: (web) move org guards folder to admin-console, refs EC-1011
* refactor: (web) move org layout to admin-console, refs EC-1011
* refactor: move manage collections to admin console, refs EC-1011
* refactor: (web) move collection-dialog to admin-console, refs EC-1011
* refactor: (web) move entity users/events and events component to admin-console, refs EC-1011
* refactor: (web) move groups/group-add-edit to admin-console, refs EC-1011
* refactor: (web) move manage, org-manage module, and user-confirm to admin-console, refs EC-1011
* refactor: (web) move people to admin-console, refs EC-1011
* refactor: (web) move reset-password to admin-console, refs EC-1011
* refactor: (web) move organization-routing and module to admin-console, refs EC-1011
* refactor: move admin-console and billing within app scope, refs EC-1011
* fix: update leftover merge conflicts, refs EC-1011
* refactor: (web) member-dialog to admin-console, refs EC-1011
* refactor: (web) move policies to admin-console, refs EC-1011
* refactor: (web) move reporting to admin-console, refs EC-1011
* refactor: (web) move settings to admin-console, refs EC-1011
* refactor: (web) move sponsorships to admin-console, refs EC-1011
* refactor: (web) move tools to admin-console, refs EC-1011
* refactor: (web) move users to admin-console, refs EC-1011
* refactor: (web) move collections to admin-console, refs EC-1011
* refactor: (web) move create-organization to admin-console, refs EC-1011
* refactor: (web) move licensed components to admin-console, refs EC-1011
* refactor: (web) move bit organization modules to admin-console, refs EC-1011
* fix: update leftover import statements for organizations.module, refs EC-1011
* refactor: (web) move personal vault and max timeout to admin-console, refs EC-1011
* refactor: (web) move providers to admin-console, refs EC-1011
* refactor: (libs) move organization service to admin-console, refs EC-1011
* refactor: (libs) move profile org/provider responses and other misc org responses to admin-console, refs EC-1011
* refactor: (libs) move provider request and selectionion-read-only request to admin-console, refs EC-1011
* fix: update missed import path for provider-user-update request, refs EC-1011
* refactor: (libs) move abstractions to admin-console, refs EC-1011
* refactor: (libs) move org/provider enums to admin-console, refs EC-1011
* fix: update downstream import statements from libs changes, refs EC-1011
* refactor: (libs) move data files to admin-console, refs EC-1011
* refactor: (libs) move domain to admin-console, refs EC-1011
* refactor: (libs) move request objects to admin-console, refs EC-1011
* fix: update downstream import changes from libs, refs EC-1011
* refactor: move leftover provider files to admin-console, refs EC-1011
* refactor: (browser) move group policy environment to admin-console, refs EC-1011
* fix: (browser) update downstream import statements, refs EC-1011
* fix: (desktop) update downstream libs moves, refs EC-1011
* fix: (cli) update downstream import changes from libs, refs EC-1011
* refactor: move org-auth related files to admin-console, refs EC-1011
* refactor: (libs) move request objects to admin-console, refs EC-1011
* refactor: move persmissions to admin-console, refs EC-1011
* refactor: move sponsored families to admin-console and fix libs changes, refs EC-1011
* refactor: move collections to admin-console, refs EC-1011
* refactor: move spec file back to spec scope, refs EC-1011
* fix: update downstream imports due to libs changes, refs EC-1011
* fix: udpate downstream import changes due to libs, refs EC-1011
* fix: update downstream imports due to libs changes, refs EC-1011
* fix: update downstream imports from libs changes, refs EC-1011
* fix: update path malformation in jslib-services.module, refs EC-1011
* fix: lint errors from improper casing, refs AC-1011
* fix: update downstream filename changes, refs AC-1011
* fix: (cli) update downstream filename changes, refs AC-1011
* fix: (desktop) update downstream filename changes, refs AC-1011
* fix: (browser) update downstream filename changes, refs AC-1011
* fix: lint errors, refs AC-1011
* fix: prettier, refs AC-1011
* fix: lint fixes for import order, refs AC-1011
* fix: update import path for provider user type, refs AC-1011
* fix: update new codes import paths for admin console structure, refs AC-1011
* fix: lint/prettier, refs AC-1011
* fix: update layout stories path, refs AC-1011
* fix: update comoponents card icons base variable in styles, refs AC-1011
* fix: update provider service path in permissions guard spec, refs AC-1011
* fix: update provider permission guard path, refs AC-1011
* fix: remove unecessary TODO for shared index export statement, refs AC-1011
* refactor: move browser-organization service and cli organization-user response out of admin-console, refs AC-1011
* refactor: move web/browser/desktop collections component to vault domain, refs AC-1011
* refactor: move organization.module out of admin-console scope, refs AC-1011
* fix: prettier, refs AC-1011
* refactor: move organizations-api-key.request out of admin-console scope, refs AC-1011
2023-03-22 16:03:50 +01:00
|
|
|
import { SubscriptionRoutingModule } from "../app/billing/settings/subscription-routing.module";
|
2022-08-26 05:00:14 +02:00
|
|
|
import { flagEnabled, Flags } from "../utils/flags";
|
2022-07-13 18:22:58 +02:00
|
|
|
|
2022-08-08 21:08:35 +02:00
|
|
|
import { TrialInitiationComponent } from "./accounts/trial-initiation/trial-initiation.component";
|
[AC-1011] Admin Console / Billing code ownership (#4973)
* refactor: move SCIM component to admin-console, refs EC-1011
* refactor: move scimProviderType to admin-console, refs EC-1011
* refactor: move scim-config.api to admin-console, refs EC-1011
* refactor: create models folder and nest existing api contents, refs EC-1011
* refactor: move scim-config to admin-console models, refs EC-1011
* refactor: move billing.component to billing, refs EC-1011
* refactor: remove nested app folder from new billing structure, refs EC-1011
* refactor: move organizations/billing to billing, refs EC-1011
* refactor: move add-credit and adjust-payment to billing/settings, refs EC-1011
* refactor: billing history/sync to billing, refs EC-1011
* refactor: move org plans, payment/method to billing/settings, refs EC-1011
* fix: update legacy file paths for payment-method and tax-info, refs EC-1011
* fix: update imports for scim component, refs EC-1011
* refactor: move subscription and tax-info into billing, refs EC-1011
* refactor: move user-subscription to billing, refs EC-1011
* refactor: move images/cards to billing and update base path, refs EC-1011
* refactor: move payment-method, plan subscription, and plan to billing, refs EC-1011
* refactor: move transaction-type to billing, refs EC-1011
* refactor: move billing-sync-config to billing, refs EC-1011
* refactor: move billing-sync and bit-pay-invoice request to billing, refs EC-1011
* refactor: move org subscription and tax info update requests to billing, refs EC-1011
* fix: broken paths to billing, refs EC-1011
* refactor: move payment request to billing, refs EC-1011
* fix: update remaining imports for payment-request, refs EC-1011
* refactor: move tax-info-update to billing, refs EC-1011
* refactor: move billing-payment, billing-history, and billing responses to billing, refs EC-1011
* refactor: move organization-subscription-responset to billing, refs EC-1011
* refactor: move payment and plan responses to billing, refs EC-1011
* refactor: move subscription response to billing ,refs EC-1011
* refactor: move tax info and rate responses to billing, refs EC-1011
* fix: update remaining path to base response for tax-rate response, refs EC-1011
* refactor: (browser) move organization-service to admin-console, refs EC-1011
* refactor: (browser) move organizaiton-service to admin-console, refs EC-1011
* refactor: (cli) move share command to admin-console, refs EC-1011
* refactor: move organization-collect request model to admin-console, refs EC-1011
* refactor: (web) move organization, collection/user responses to admin-console, refs EC-1011
* refactor: (cli) move selection-read-only to admin-console, refs EC-1011
* refactor: (desktop) move organization-filter to admin-console, refs EC-1011
* refactor: (web) move organization-switcher to admin-console, refs EC-1011
* refactor: (web) move access-selector to admin-console, refs EC-1011
* refactor: (web) move create folder to admin-console, refs EC-1011
* refactor: (web) move org guards folder to admin-console, refs EC-1011
* refactor: (web) move org layout to admin-console, refs EC-1011
* refactor: move manage collections to admin console, refs EC-1011
* refactor: (web) move collection-dialog to admin-console, refs EC-1011
* refactor: (web) move entity users/events and events component to admin-console, refs EC-1011
* refactor: (web) move groups/group-add-edit to admin-console, refs EC-1011
* refactor: (web) move manage, org-manage module, and user-confirm to admin-console, refs EC-1011
* refactor: (web) move people to admin-console, refs EC-1011
* refactor: (web) move reset-password to admin-console, refs EC-1011
* refactor: (web) move organization-routing and module to admin-console, refs EC-1011
* refactor: move admin-console and billing within app scope, refs EC-1011
* fix: update leftover merge conflicts, refs EC-1011
* refactor: (web) member-dialog to admin-console, refs EC-1011
* refactor: (web) move policies to admin-console, refs EC-1011
* refactor: (web) move reporting to admin-console, refs EC-1011
* refactor: (web) move settings to admin-console, refs EC-1011
* refactor: (web) move sponsorships to admin-console, refs EC-1011
* refactor: (web) move tools to admin-console, refs EC-1011
* refactor: (web) move users to admin-console, refs EC-1011
* refactor: (web) move collections to admin-console, refs EC-1011
* refactor: (web) move create-organization to admin-console, refs EC-1011
* refactor: (web) move licensed components to admin-console, refs EC-1011
* refactor: (web) move bit organization modules to admin-console, refs EC-1011
* fix: update leftover import statements for organizations.module, refs EC-1011
* refactor: (web) move personal vault and max timeout to admin-console, refs EC-1011
* refactor: (web) move providers to admin-console, refs EC-1011
* refactor: (libs) move organization service to admin-console, refs EC-1011
* refactor: (libs) move profile org/provider responses and other misc org responses to admin-console, refs EC-1011
* refactor: (libs) move provider request and selectionion-read-only request to admin-console, refs EC-1011
* fix: update missed import path for provider-user-update request, refs EC-1011
* refactor: (libs) move abstractions to admin-console, refs EC-1011
* refactor: (libs) move org/provider enums to admin-console, refs EC-1011
* fix: update downstream import statements from libs changes, refs EC-1011
* refactor: (libs) move data files to admin-console, refs EC-1011
* refactor: (libs) move domain to admin-console, refs EC-1011
* refactor: (libs) move request objects to admin-console, refs EC-1011
* fix: update downstream import changes from libs, refs EC-1011
* refactor: move leftover provider files to admin-console, refs EC-1011
* refactor: (browser) move group policy environment to admin-console, refs EC-1011
* fix: (browser) update downstream import statements, refs EC-1011
* fix: (desktop) update downstream libs moves, refs EC-1011
* fix: (cli) update downstream import changes from libs, refs EC-1011
* refactor: move org-auth related files to admin-console, refs EC-1011
* refactor: (libs) move request objects to admin-console, refs EC-1011
* refactor: move persmissions to admin-console, refs EC-1011
* refactor: move sponsored families to admin-console and fix libs changes, refs EC-1011
* refactor: move collections to admin-console, refs EC-1011
* refactor: move spec file back to spec scope, refs EC-1011
* fix: update downstream imports due to libs changes, refs EC-1011
* fix: udpate downstream import changes due to libs, refs EC-1011
* fix: update downstream imports due to libs changes, refs EC-1011
* fix: update downstream imports from libs changes, refs EC-1011
* fix: update path malformation in jslib-services.module, refs EC-1011
* fix: lint errors from improper casing, refs AC-1011
* fix: update downstream filename changes, refs AC-1011
* fix: (cli) update downstream filename changes, refs AC-1011
* fix: (desktop) update downstream filename changes, refs AC-1011
* fix: (browser) update downstream filename changes, refs AC-1011
* fix: lint errors, refs AC-1011
* fix: prettier, refs AC-1011
* fix: lint fixes for import order, refs AC-1011
* fix: update import path for provider user type, refs AC-1011
* fix: update new codes import paths for admin console structure, refs AC-1011
* fix: lint/prettier, refs AC-1011
* fix: update layout stories path, refs AC-1011
* fix: update comoponents card icons base variable in styles, refs AC-1011
* fix: update provider service path in permissions guard spec, refs AC-1011
* fix: update provider permission guard path, refs AC-1011
* fix: remove unecessary TODO for shared index export statement, refs AC-1011
* refactor: move browser-organization service and cli organization-user response out of admin-console, refs AC-1011
* refactor: move web/browser/desktop collections component to vault domain, refs AC-1011
* refactor: move organization.module out of admin-console scope, refs AC-1011
* fix: prettier, refs AC-1011
* refactor: move organizations-api-key.request out of admin-console scope, refs AC-1011
2023-03-22 16:03:50 +01:00
|
|
|
import { AcceptFamilySponsorshipComponent } from "./admin-console/organizations/sponsorships/accept-family-sponsorship.component";
|
|
|
|
import { FamiliesForEnterpriseSetupComponent } from "./admin-console/organizations/sponsorships/families-for-enterprise-setup.component";
|
|
|
|
import { CreateOrganizationComponent } from "./admin-console/settings/create-organization.component";
|
|
|
|
import { SponsoredFamiliesComponent } from "./admin-console/settings/sponsored-families.component";
|
2023-05-02 22:08:52 +02:00
|
|
|
import { AcceptEmergencyComponent } from "./auth/accept-emergency.component";
|
|
|
|
import { AcceptOrganizationComponent } from "./auth/accept-organization.component";
|
|
|
|
import { HintComponent } from "./auth/hint.component";
|
|
|
|
import { LockComponent } from "./auth/lock.component";
|
|
|
|
import { LoginWithDeviceComponent } from "./auth/login/login-with-device.component";
|
|
|
|
import { LoginComponent } from "./auth/login/login.component";
|
|
|
|
import { RecoverDeleteComponent } from "./auth/recover-delete.component";
|
|
|
|
import { RecoverTwoFactorComponent } from "./auth/recover-two-factor.component";
|
|
|
|
import { RemovePasswordComponent } from "./auth/remove-password.component";
|
|
|
|
import { SetPasswordComponent } from "./auth/set-password.component";
|
|
|
|
import { EmergencyAccessViewComponent } from "./auth/settings/emergency-access/emergency-access-view.component";
|
|
|
|
import { EmergencyAccessComponent } from "./auth/settings/emergency-access/emergency-access.component";
|
|
|
|
import { SsoComponent } from "./auth/sso.component";
|
|
|
|
import { TwoFactorComponent } from "./auth/two-factor.component";
|
|
|
|
import { UpdatePasswordComponent } from "./auth/update-password.component";
|
|
|
|
import { UpdateTempPasswordComponent } from "./auth/update-temp-password.component";
|
|
|
|
import { VerifyEmailTokenComponent } from "./auth/verify-email-token.component";
|
|
|
|
import { VerifyRecoverDeleteComponent } from "./auth/verify-recover-delete.component";
|
2022-04-25 15:41:44 +02:00
|
|
|
import { HomeGuard } from "./guards/home.guard";
|
2022-02-24 12:10:07 +01:00
|
|
|
import { FrontendLayoutComponent } from "./layouts/frontend-layout.component";
|
|
|
|
import { UserLayoutComponent } from "./layouts/user-layout.component";
|
2022-08-03 21:40:04 +02:00
|
|
|
import { ReportsModule } from "./reports";
|
2018-06-21 04:27:37 +02:00
|
|
|
import { AccountComponent } from "./settings/account.component";
|
2018-06-26 05:16:59 +02:00
|
|
|
import { DomainRulesComponent } from "./settings/domain-rules.component";
|
2022-05-09 14:21:52 +02:00
|
|
|
import { PreferencesComponent } from "./settings/preferences.component";
|
2022-06-28 22:24:21 +02:00
|
|
|
import { SecurityRoutingModule } from "./settings/security-routing.module";
|
2018-06-21 04:27:37 +02:00
|
|
|
import { SettingsComponent } from "./settings/settings.component";
|
2022-04-01 05:32:57 +02:00
|
|
|
import { GeneratorComponent } from "./tools/generator.component";
|
2023-03-29 16:23:37 +02:00
|
|
|
import { AccessComponent } from "./tools/send/access.component";
|
|
|
|
import { SendComponent } from "./tools/send/send.component";
|
2018-06-10 05:33:12 +02:00
|
|
|
import { ToolsComponent } from "./tools/tools.component";
|
2023-02-22 17:21:32 +01:00
|
|
|
import { VaultModule } from "./vault/individual-vault/vault.module";
|
2018-06-05 05:10:41 +02:00
|
|
|
|
|
|
|
const routes: Routes = [
|
|
|
|
{
|
2018-06-08 23:08:19 +02:00
|
|
|
path: "",
|
2018-06-10 04:02:45 +02:00
|
|
|
component: FrontendLayoutComponent,
|
2022-04-25 15:41:44 +02:00
|
|
|
data: { doNotSaveUrl: true },
|
2018-06-08 23:08:19 +02:00
|
|
|
children: [
|
2022-04-25 15:41:44 +02:00
|
|
|
{
|
|
|
|
path: "",
|
|
|
|
pathMatch: "full",
|
|
|
|
children: [], // Children lets us have an empty component.
|
|
|
|
canActivate: [HomeGuard], // Redirects either to vault, login or lock page.
|
|
|
|
},
|
2022-05-09 14:21:52 +02:00
|
|
|
{ path: "login", component: LoginComponent, canActivate: [UnauthGuard] },
|
2022-09-27 00:26:10 +02:00
|
|
|
{
|
|
|
|
path: "login-with-device",
|
|
|
|
component: LoginWithDeviceComponent,
|
|
|
|
data: { titleId: "loginWithDevice" },
|
|
|
|
},
|
2022-05-09 14:21:52 +02:00
|
|
|
{ path: "2fa", component: TwoFactorComponent, canActivate: [UnauthGuard] },
|
2021-12-17 15:57:11 +01:00
|
|
|
{
|
2018-07-06 04:37:35 +02:00
|
|
|
path: "register",
|
2022-12-12 21:59:40 +01:00
|
|
|
component: TrialInitiationComponent,
|
2022-05-09 14:21:52 +02:00
|
|
|
canActivate: [UnauthGuard],
|
2018-07-06 04:37:35 +02:00
|
|
|
data: { titleId: "createAccount" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
2022-12-12 21:59:40 +01:00
|
|
|
{
|
2022-07-25 20:44:51 +02:00
|
|
|
path: "trial",
|
2022-12-12 21:59:40 +01:00
|
|
|
redirectTo: "register",
|
|
|
|
pathMatch: "full",
|
|
|
|
},
|
2021-12-17 15:57:11 +01:00
|
|
|
{
|
|
|
|
path: "sso",
|
2020-07-16 15:18:25 +02:00
|
|
|
component: SsoComponent,
|
2022-05-09 14:21:52 +02:00
|
|
|
canActivate: [UnauthGuard],
|
2020-08-20 22:39:05 +02:00
|
|
|
data: { titleId: "enterpriseSingleSignOn" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
{
|
2020-08-19 17:15:04 +02:00
|
|
|
path: "set-password",
|
|
|
|
component: SetPasswordComponent,
|
2020-08-13 20:32:07 +02:00
|
|
|
data: { titleId: "setMasterPassword" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
{
|
2018-07-06 04:37:35 +02:00
|
|
|
path: "hint",
|
|
|
|
component: HintComponent,
|
2022-05-09 14:21:52 +02:00
|
|
|
canActivate: [UnauthGuard],
|
2018-07-06 04:37:35 +02:00
|
|
|
data: { titleId: "passwordHint" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
{
|
2021-04-22 10:13:43 +02:00
|
|
|
path: "lock",
|
|
|
|
component: LockComponent,
|
2022-05-09 14:21:52 +02:00
|
|
|
canActivate: [LockGuard],
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
2018-07-12 20:19:47 +02:00
|
|
|
{ path: "verify-email", component: VerifyEmailTokenComponent },
|
2021-12-17 15:57:11 +01:00
|
|
|
{
|
2018-07-13 22:24:53 +02:00
|
|
|
path: "accept-organization",
|
|
|
|
component: AcceptOrganizationComponent,
|
2022-04-25 15:41:44 +02:00
|
|
|
data: { titleId: "joinOrganization", doNotSaveUrl: false },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
{
|
2020-12-22 16:57:44 +01:00
|
|
|
path: "accept-emergency",
|
|
|
|
component: AcceptEmergencyComponent,
|
2022-04-25 15:41:44 +02:00
|
|
|
data: { titleId: "acceptEmergency", doNotSaveUrl: false },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "accept-families-for-enterprise",
|
|
|
|
component: AcceptFamilySponsorshipComponent,
|
|
|
|
data: { titleId: "acceptFamilySponsorship", doNotSaveUrl: false },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
2018-07-13 21:36:27 +02:00
|
|
|
{ path: "recover", pathMatch: "full", redirectTo: "recover-2fa" },
|
2021-12-17 15:57:11 +01:00
|
|
|
{
|
2018-07-13 21:36:27 +02:00
|
|
|
path: "recover-2fa",
|
2018-07-13 22:24:53 +02:00
|
|
|
component: RecoverTwoFactorComponent,
|
2022-05-09 14:21:52 +02:00
|
|
|
canActivate: [UnauthGuard],
|
2018-07-13 22:24:53 +02:00
|
|
|
data: { titleId: "recoverAccountTwoStep" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
{
|
2018-07-13 22:24:53 +02:00
|
|
|
path: "recover-delete",
|
|
|
|
component: RecoverDeleteComponent,
|
2022-05-09 14:21:52 +02:00
|
|
|
canActivate: [UnauthGuard],
|
2018-07-13 22:24:53 +02:00
|
|
|
data: { titleId: "deleteAccount" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
{
|
2018-07-13 22:24:53 +02:00
|
|
|
path: "verify-recover-delete",
|
|
|
|
component: VerifyRecoverDeleteComponent,
|
2022-05-09 14:21:52 +02:00
|
|
|
canActivate: [UnauthGuard],
|
2018-07-13 22:24:53 +02:00
|
|
|
data: { titleId: "deleteAccount" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
{
|
2020-11-04 20:49:08 +01:00
|
|
|
path: "send/:sendId/:key",
|
|
|
|
component: AccessComponent,
|
|
|
|
data: { title: "Bitwarden Send" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
{
|
2021-08-10 14:10:54 +02:00
|
|
|
path: "update-temp-password",
|
|
|
|
component: UpdateTempPasswordComponent,
|
2022-05-09 14:21:52 +02:00
|
|
|
canActivate: [AuthGuard],
|
2021-08-10 14:10:54 +02:00
|
|
|
data: { titleId: "updateTempPassword" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
2022-02-03 06:00:57 +01:00
|
|
|
{
|
|
|
|
path: "update-password",
|
|
|
|
component: UpdatePasswordComponent,
|
2022-05-09 14:21:52 +02:00
|
|
|
canActivate: [AuthGuard],
|
2022-02-03 06:00:57 +01:00
|
|
|
data: { titleId: "updatePassword" },
|
|
|
|
},
|
2021-12-17 15:57:11 +01:00
|
|
|
{
|
2021-11-09 19:24:26 +01:00
|
|
|
path: "remove-password",
|
|
|
|
component: RemovePasswordComponent,
|
2022-05-09 14:21:52 +02:00
|
|
|
canActivate: [AuthGuard],
|
2021-11-09 19:24:26 +01:00
|
|
|
data: { titleId: "removeMasterPassword" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "",
|
2018-06-10 04:02:45 +02:00
|
|
|
component: UserLayoutComponent,
|
2022-05-09 14:21:52 +02:00
|
|
|
canActivate: [AuthGuard],
|
2018-06-08 23:08:19 +02:00
|
|
|
children: [
|
2022-05-09 14:21:52 +02:00
|
|
|
{
|
|
|
|
path: "vault",
|
2022-08-08 21:08:35 +02:00
|
|
|
loadChildren: () => VaultModule,
|
2022-05-09 14:21:52 +02:00
|
|
|
},
|
2020-12-11 22:43:28 +01:00
|
|
|
{ path: "sends", component: SendComponent, data: { title: "Send" } },
|
2022-05-11 21:39:39 +02:00
|
|
|
{
|
|
|
|
path: "create-organization",
|
|
|
|
component: CreateOrganizationComponent,
|
|
|
|
data: { titleId: "newOrganization" },
|
|
|
|
},
|
2021-12-17 15:57:11 +01:00
|
|
|
{
|
2018-06-21 04:27:37 +02:00
|
|
|
path: "settings",
|
|
|
|
component: SettingsComponent,
|
2018-06-08 23:08:19 +02:00
|
|
|
children: [
|
2018-06-10 04:02:45 +02:00
|
|
|
{ path: "", pathMatch: "full", redirectTo: "account" },
|
|
|
|
{ path: "account", component: AccountComponent, data: { titleId: "myAccount" } },
|
2021-12-17 15:57:11 +01:00
|
|
|
{
|
2022-05-09 14:21:52 +02:00
|
|
|
path: "preferences",
|
|
|
|
component: PreferencesComponent,
|
|
|
|
data: { titleId: "preferences" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
{
|
2022-05-09 14:21:52 +02:00
|
|
|
path: "security",
|
2022-06-28 22:24:21 +02:00
|
|
|
loadChildren: () => SecurityRoutingModule,
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
{
|
2022-05-09 14:21:52 +02:00
|
|
|
path: "domain-rules",
|
|
|
|
component: DomainRulesComponent,
|
|
|
|
data: { titleId: "domainRules" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
{
|
2022-05-09 14:21:52 +02:00
|
|
|
path: "subscription",
|
2022-06-28 22:24:21 +02:00
|
|
|
loadChildren: () => SubscriptionRoutingModule,
|
2018-07-06 04:37:35 +02:00
|
|
|
},
|
2021-12-17 15:57:11 +01:00
|
|
|
{
|
2020-07-16 15:18:25 +02:00
|
|
|
path: "emergency-access",
|
2020-12-22 16:57:44 +01:00
|
|
|
children: [
|
2021-12-17 15:57:11 +01:00
|
|
|
{
|
|
|
|
path: "",
|
2020-07-16 15:18:25 +02:00
|
|
|
component: EmergencyAccessComponent,
|
2021-06-02 18:35:49 +02:00
|
|
|
data: { titleId: "emergencyAccess" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: ":id",
|
2020-12-22 16:57:44 +01:00
|
|
|
component: EmergencyAccessViewComponent,
|
2021-06-02 18:35:49 +02:00
|
|
|
data: { titleId: "emergencyAccess" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
2020-07-16 15:18:25 +02:00
|
|
|
path: "sponsored-families",
|
|
|
|
component: SponsoredFamiliesComponent,
|
2021-11-22 14:41:40 +01:00
|
|
|
data: { titleId: "sponsoredFamilies" },
|
2021-12-17 15:57:11 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
2018-06-10 05:33:12 +02:00
|
|
|
path: "tools",
|
|
|
|
component: ToolsComponent,
|
2022-05-09 14:21:52 +02:00
|
|
|
canActivate: [AuthGuard],
|
2018-06-10 05:33:12 +02:00
|
|
|
children: [
|
2020-08-20 22:39:05 +02:00
|
|
|
{ path: "", pathMatch: "full", redirectTo: "generator" },
|
2022-06-28 22:24:21 +02:00
|
|
|
{
|
|
|
|
path: "",
|
|
|
|
loadChildren: () =>
|
|
|
|
import("./tools/import-export/import-export.module").then(
|
|
|
|
(m) => m.ImportExportModule
|
|
|
|
),
|
|
|
|
},
|
2021-12-17 15:57:11 +01:00
|
|
|
{
|
2018-07-06 04:37:35 +02:00
|
|
|
path: "generator",
|
2022-04-01 05:32:57 +02:00
|
|
|
component: GeneratorComponent,
|
2022-03-29 21:02:48 +02:00
|
|
|
data: { titleId: "generator" },
|
2020-07-16 15:18:25 +02:00
|
|
|
},
|
2021-12-17 15:57:11 +01:00
|
|
|
],
|
|
|
|
},
|
2022-03-29 21:55:47 +02:00
|
|
|
{
|
|
|
|
path: "reports",
|
2022-08-03 21:40:04 +02:00
|
|
|
loadChildren: () => ReportsModule,
|
2022-03-29 21:55:47 +02:00
|
|
|
},
|
2018-07-12 20:19:47 +02:00
|
|
|
{ path: "setup/families-for-enterprise", component: FamiliesForEnterpriseSetupComponent },
|
2021-12-17 15:57:11 +01:00
|
|
|
],
|
|
|
|
},
|
2022-05-13 00:31:30 +02:00
|
|
|
{
|
|
|
|
path: "organizations",
|
2023-05-25 16:49:30 +02:00
|
|
|
loadChildren: () =>
|
|
|
|
import("./admin-console/organizations/organization.module").then((m) => m.OrganizationModule),
|
2022-05-13 00:31:30 +02:00
|
|
|
},
|
2018-06-05 05:10:41 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [
|
|
|
|
RouterModule.forRoot(routes, {
|
|
|
|
useHash: true,
|
2021-01-12 21:31:22 +01:00
|
|
|
paramsInheritanceStrategy: "always",
|
2022-05-09 14:21:52 +02:00
|
|
|
// enableTracing: true,
|
2018-06-05 05:10:41 +02:00
|
|
|
}),
|
|
|
|
],
|
|
|
|
exports: [RouterModule],
|
|
|
|
})
|
2021-07-21 11:32:27 +02:00
|
|
|
export class OssRoutingModule {}
|
2022-07-13 18:22:58 +02:00
|
|
|
|
2022-08-26 05:00:14 +02:00
|
|
|
export function buildFlaggedRoute(flagName: keyof Flags, route: Route): Route {
|
2022-07-13 18:22:58 +02:00
|
|
|
return flagEnabled(flagName)
|
|
|
|
? route
|
|
|
|
: {
|
|
|
|
path: route.path,
|
|
|
|
redirectTo: "/",
|
|
|
|
};
|
|
|
|
}
|