bitwarden-estensione-browser/src/app/oss-routing.module.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

483 lines
19 KiB
TypeScript
Raw Normal View History

2018-06-05 05:10:41 +02:00
import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
2018-06-08 23:08:19 +02:00
import { FrontendLayoutComponent } from "./layouts/frontend-layout.component";
import { OrganizationLayoutComponent } from "./layouts/organization-layout.component";
import { UserLayoutComponent } from "./layouts/user-layout.component";
import { AcceptEmergencyComponent } from "./accounts/accept-emergency.component";
2018-07-12 22:05:42 +02:00
import { AcceptOrganizationComponent } from "./accounts/accept-organization.component";
2018-06-05 21:02:53 +02:00
import { HintComponent } from "./accounts/hint.component";
import { LockComponent } from "./accounts/lock.component";
2018-06-05 21:02:53 +02:00
import { LoginComponent } from "./accounts/login.component";
2018-07-13 21:54:49 +02:00
import { RecoverDeleteComponent } from "./accounts/recover-delete.component";
2018-07-13 21:36:27 +02:00
import { RecoverTwoFactorComponent } from "./accounts/recover-two-factor.component";
2018-06-05 21:02:53 +02:00
import { RegisterComponent } from "./accounts/register.component";
import { RemovePasswordComponent } from "./accounts/remove-password.component";
2020-08-19 17:15:04 +02:00
import { SetPasswordComponent } from "./accounts/set-password.component";
import { SsoComponent } from "./accounts/sso.component";
2018-06-05 21:02:53 +02:00
import { TwoFactorComponent } from "./accounts/two-factor.component";
import { UpdateTempPasswordComponent } from "./accounts/update-temp-password.component";
2018-07-12 20:19:47 +02:00
import { VerifyEmailTokenComponent } from "./accounts/verify-email-token.component";
2018-07-13 22:24:53 +02:00
import { VerifyRecoverDeleteComponent } from "./accounts/verify-recover-delete.component";
2018-06-05 21:02:53 +02:00
2018-07-06 16:21:08 +02:00
import { CollectionsComponent as OrgManageCollectionsComponent } from "./organizations/manage/collections.component";
import { EventsComponent as OrgEventsComponent } from "./organizations/manage/events.component";
import { GroupsComponent as OrgGroupsComponent } from "./organizations/manage/groups.component";
import { ManageComponent as OrgManageComponent } from "./organizations/manage/manage.component";
import { PeopleComponent as OrgPeopleComponent } from "./organizations/manage/people.component";
2020-01-15 22:51:42 +01:00
import { PoliciesComponent as OrgPoliciesComponent } from "./organizations/manage/policies.component";
2018-07-06 16:21:08 +02:00
2018-07-16 18:42:49 +02:00
import { AccountComponent as OrgAccountComponent } from "./organizations/settings/account.component";
2018-07-16 23:17:07 +02:00
import { OrganizationBillingComponent } from "./organizations/settings/organization-billing.component";
import { OrganizationSubscriptionComponent } from "./organizations/settings/organization-subscription.component";
2018-07-16 18:42:49 +02:00
import { SettingsComponent as OrgSettingsComponent } from "./organizations/settings/settings.component";
2018-07-18 23:10:26 +02:00
import { TwoFactorSetupComponent as OrgTwoFactorSetupComponent } from "./organizations/settings/two-factor-setup.component";
2018-07-16 18:42:49 +02:00
Feature/families for enterprise (#1300) * Added manual routing * Families for enterprise/account settings (#1290) * Added sponsored families page * Revert "Added manual routing" This reverts commit a970ba78ffa98545176b636630e48115efcf51cc. * Add messages to page * Remove stages and simplify design * Switch to new figma design * Add screen reader * Add calls to server * Reorder methods * Used to organization filters * Connected page to server * Add preliminary text to subscription page * Sponsor existing family organization flow * Update jslib Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Add revoke sponsorship flow * Add spinner to send offer button * Determine if subscription has sponsored items * Work on subscription button * Add message for new family organization * Families for enterprise/subscription page (#1292) * Work on subscription button * Determine if subscription has sponsored items * Work on subscriptions page * Add message for new family organization Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Families for enterprise/redeem card (#1295) * Add toast localization message * Use helpers to property display sponsorship items * Split table rows into component so buttons load (#1296) * Split table rows into component so buttons load * Update jslib * Families for enterprise/localizations (#1299) * Add more localizations * Remove unneeded comments * Fix help article * Run linting * Do not show redeem button if no orgs exist to redeem * Implement new process for accepting sponsorships * Hide business checkbox * Update jslib * Removed commented code * Remove commented html * Cleaned up imports * Use proper message * Remove merge conflict message * Remove confusing comment * Listened to PR feedback * Remove unused property * Update help text * Fix aria labels * Add try catch * Made toast before emit * Minor copy changes * Update jslib * Remove unneeded loading Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2021-11-22 14:41:40 +01:00
import { FamiliesForEnterpriseSetupComponent } from "./organizations/sponsorships/families-for-enterprise-setup.component";
2018-07-05 20:40:53 +02:00
import { ExportComponent as OrgExportComponent } from "./organizations/tools/export.component";
2018-12-14 19:56:01 +01:00
import { ExposedPasswordsReportComponent as OrgExposedPasswordsReportComponent } from "./organizations/tools/exposed-passwords-report.component";
2018-07-06 05:38:36 +02:00
import { ImportComponent as OrgImportComponent } from "./organizations/tools/import.component";
2018-12-14 20:22:30 +01:00
import { InactiveTwoFactorReportComponent as OrgInactiveTwoFactorReportComponent } from "./organizations/tools/inactive-two-factor-report.component";
2018-12-14 20:42:04 +01:00
import { ReusedPasswordsReportComponent as OrgReusedPasswordsReportComponent } from "./organizations/tools/reused-passwords-report.component";
2018-07-05 20:40:53 +02:00
import { ToolsComponent as OrgToolsComponent } from "./organizations/tools/tools.component";
2018-12-14 20:42:04 +01:00
import { UnsecuredWebsitesReportComponent as OrgUnsecuredWebsitesReportComponent } from "./organizations/tools/unsecured-websites-report.component";
import { WeakPasswordsReportComponent as OrgWeakPasswordsReportComponent } from "./organizations/tools/weak-passwords-report.component";
2018-07-05 20:40:53 +02:00
import { VaultComponent as OrgVaultComponent } from "./organizations/vault/vault.component";
2018-07-03 18:34:20 +02:00
import { AccessComponent } from "./send/access.component";
import { SendComponent } from "./send/send.component";
2018-06-21 04:27:37 +02:00
import { AccountComponent } from "./settings/account.component";
2018-07-02 23:09:53 +02:00
import { CreateOrganizationComponent } from "./settings/create-organization.component";
2018-06-26 05:16:59 +02:00
import { DomainRulesComponent } from "./settings/domain-rules.component";
2018-06-25 22:44:06 +02:00
import { OptionsComponent } from "./settings/options.component";
import { OrganizationsComponent } from "./settings/organizations.component";
import { PremiumComponent } from "./settings/premium.component";
2018-06-21 04:27:37 +02:00
import { SettingsComponent } from "./settings/settings.component";
2018-06-27 04:51:58 +02:00
import { TwoFactorSetupComponent } from "./settings/two-factor-setup.component";
2018-06-28 20:05:04 +02:00
import { UserBillingComponent } from "./settings/user-billing.component";
import { UserSubscriptionComponent } from "./settings/user-subscription.component";
2018-06-21 04:27:37 +02:00
2018-06-28 17:58:33 +02:00
import { BreachReportComponent } from "./tools/breach-report.component";
2018-06-10 05:33:12 +02:00
import { ExportComponent } from "./tools/export.component";
2018-12-12 04:09:16 +01:00
import { ExposedPasswordsReportComponent } from "./tools/exposed-passwords-report.component";
2018-06-10 05:33:12 +02:00
import { ImportComponent } from "./tools/import.component";
2018-12-12 05:25:05 +01:00
import { InactiveTwoFactorReportComponent } from "./tools/inactive-two-factor-report.component";
2018-06-21 00:16:20 +02:00
import { PasswordGeneratorComponent } from "./tools/password-generator.component";
2018-12-11 20:47:41 +01:00
import { ReusedPasswordsReportComponent } from "./tools/reused-passwords-report.component";
2018-06-10 05:33:12 +02:00
import { ToolsComponent } from "./tools/tools.component";
2018-12-11 21:11:16 +01:00
import { UnsecuredWebsitesReportComponent } from "./tools/unsecured-websites-report.component";
2018-12-11 23:49:51 +01:00
import { WeakPasswordsReportComponent } from "./tools/weak-passwords-report.component";
2018-06-10 05:33:12 +02:00
2018-06-05 05:10:41 +02:00
import { VaultComponent } from "./vault/vault.component";
2018-07-05 21:27:23 +02:00
import { OrganizationGuardService } from "./services/organization-guard.service";
import { OrganizationTypeGuardService } from "./services/organization-type-guard.service";
2018-06-10 04:02:45 +02:00
import { AuthGuardService } from "jslib-angular/services/auth-guard.service";
import { LockGuardService } from "jslib-angular/services/lock-guard.service";
import { UnauthGuardService } from "jslib-angular/services/unauth-guard.service";
2018-06-10 04:02:45 +02:00
import { Permissions } from "jslib-common/enums/permissions";
import { EmergencyAccessViewComponent } from "./settings/emergency-access-view.component";
import { EmergencyAccessComponent } from "./settings/emergency-access.component";
Feature/families for enterprise (#1300) * Added manual routing * Families for enterprise/account settings (#1290) * Added sponsored families page * Revert "Added manual routing" This reverts commit a970ba78ffa98545176b636630e48115efcf51cc. * Add messages to page * Remove stages and simplify design * Switch to new figma design * Add screen reader * Add calls to server * Reorder methods * Used to organization filters * Connected page to server * Add preliminary text to subscription page * Sponsor existing family organization flow * Update jslib Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Add revoke sponsorship flow * Add spinner to send offer button * Determine if subscription has sponsored items * Work on subscription button * Add message for new family organization * Families for enterprise/subscription page (#1292) * Work on subscription button * Determine if subscription has sponsored items * Work on subscriptions page * Add message for new family organization Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Families for enterprise/redeem card (#1295) * Add toast localization message * Use helpers to property display sponsorship items * Split table rows into component so buttons load (#1296) * Split table rows into component so buttons load * Update jslib * Families for enterprise/localizations (#1299) * Add more localizations * Remove unneeded comments * Fix help article * Run linting * Do not show redeem button if no orgs exist to redeem * Implement new process for accepting sponsorships * Hide business checkbox * Update jslib * Removed commented code * Remove commented html * Cleaned up imports * Use proper message * Remove merge conflict message * Remove confusing comment * Listened to PR feedback * Remove unused property * Update help text * Fix aria labels * Add try catch * Made toast before emit * Minor copy changes * Update jslib * Remove unneeded loading Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2021-11-22 14:41:40 +01:00
import { SponsoredFamiliesComponent } from "./settings/sponsored-families.component";
2018-07-05 21:27:23 +02:00
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,
2018-06-08 23:08:19 +02:00
children: [
2018-06-10 04:02:45 +02:00
{ path: "", pathMatch: "full", component: LoginComponent, canActivate: [UnauthGuardService] },
{ path: "2fa", component: TwoFactorComponent, canActivate: [UnauthGuardService] },
2021-12-17 15:57:11 +01:00
{
2018-07-06 04:37:35 +02:00
path: "register",
component: RegisterComponent,
canActivate: [UnauthGuardService],
data: { titleId: "createAccount" },
2021-12-17 15:57:11 +01:00
},
{
path: "sso",
component: SsoComponent,
2018-07-06 04:37:35 +02:00
canActivate: [UnauthGuardService],
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,
data: { titleId: "setMasterPassword" },
2021-12-17 15:57:11 +01:00
},
{
2018-07-06 04:37:35 +02:00
path: "hint",
component: HintComponent,
canActivate: [UnauthGuardService],
2018-07-06 04:37:35 +02:00
data: { titleId: "passwordHint" },
2021-12-17 15:57:11 +01:00
},
{
path: "lock",
component: LockComponent,
canActivate: [LockGuardService],
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,
data: { titleId: "joinOrganization" },
2021-12-17 15:57:11 +01:00
},
{
path: "accept-emergency",
component: AcceptEmergencyComponent,
data: { titleId: "acceptEmergency" },
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,
canActivate: [UnauthGuardService],
data: { titleId: "recoverAccountTwoStep" },
2021-12-17 15:57:11 +01:00
},
{
2018-07-13 22:24:53 +02:00
path: "recover-delete",
component: RecoverDeleteComponent,
canActivate: [UnauthGuardService],
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,
canActivate: [UnauthGuardService],
data: { titleId: "deleteAccount" },
2021-12-17 15:57:11 +01:00
},
{
path: "send/:sendId/:key",
component: AccessComponent,
data: { title: "Bitwarden Send" },
2021-12-17 15:57:11 +01:00
},
{
path: "update-temp-password",
component: UpdateTempPasswordComponent,
canActivate: [AuthGuardService],
data: { titleId: "updateTempPassword" },
2021-12-17 15:57:11 +01:00
},
{
path: "remove-password",
component: RemovePasswordComponent,
canActivate: [AuthGuardService],
data: { titleId: "removeMasterPassword" },
2021-12-17 15:57:11 +01:00
},
],
},
{
path: "",
2018-06-10 04:02:45 +02:00
component: UserLayoutComponent,
canActivate: [AuthGuardService],
2018-06-08 23:08:19 +02:00
children: [
2018-07-06 04:37:35 +02:00
{ path: "vault", component: VaultComponent, data: { titleId: "myVault" } },
2020-12-11 22:43:28 +01:00
{ path: "sends", component: SendComponent, data: { title: "Send" } },
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" } },
2018-07-06 04:37:35 +02:00
{ path: "options", component: OptionsComponent, data: { titleId: "options" } },
2021-12-17 15:57:11 +01:00
{
2018-07-06 04:37:35 +02:00
path: "domain-rules",
component: DomainRulesComponent,
data: { titleId: "domainRules" },
2021-12-17 15:57:11 +01:00
},
{
2018-06-10 04:02:45 +02:00
path: "two-factor",
component: TwoFactorSetupComponent,
2018-07-06 04:37:35 +02:00
data: { titleId: "twoStepLogin" },
2021-12-17 15:57:11 +01:00
},
2018-07-06 04:37:35 +02:00
{ path: "premium", component: PremiumComponent, data: { titleId: "goPremium" } },
{ path: "billing", component: UserBillingComponent, data: { titleId: "billing" } },
2021-12-17 15:57:11 +01:00
{
path: "subscription",
2018-07-06 04:37:35 +02:00
component: UserSubscriptionComponent,
data: { titleId: "premiumMembership" },
2021-12-17 15:57:11 +01:00
},
{
2018-07-06 04:37:35 +02:00
path: "organizations",
component: OrganizationsComponent,
data: { titleId: "organizations" },
},
{
2018-07-06 04:37:35 +02:00
path: "create-organization",
component: CreateOrganizationComponent,
data: { titleId: "newOrganization" },
2021-12-17 15:57:11 +01:00
},
{
path: "emergency-access",
children: [
2021-12-17 15:57:11 +01:00
{
path: "",
component: EmergencyAccessComponent,
data: { titleId: "emergencyAccess" },
2021-12-17 15:57:11 +01:00
},
{
path: ":id",
component: EmergencyAccessViewComponent,
data: { titleId: "emergencyAccess" },
2021-12-17 15:57:11 +01:00
},
],
},
{
path: "sponsored-families",
component: SponsoredFamiliesComponent,
Feature/families for enterprise (#1300) * Added manual routing * Families for enterprise/account settings (#1290) * Added sponsored families page * Revert "Added manual routing" This reverts commit a970ba78ffa98545176b636630e48115efcf51cc. * Add messages to page * Remove stages and simplify design * Switch to new figma design * Add screen reader * Add calls to server * Reorder methods * Used to organization filters * Connected page to server * Add preliminary text to subscription page * Sponsor existing family organization flow * Update jslib Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Add revoke sponsorship flow * Add spinner to send offer button * Determine if subscription has sponsored items * Work on subscription button * Add message for new family organization * Families for enterprise/subscription page (#1292) * Work on subscription button * Determine if subscription has sponsored items * Work on subscriptions page * Add message for new family organization Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Families for enterprise/redeem card (#1295) * Add toast localization message * Use helpers to property display sponsorship items * Split table rows into component so buttons load (#1296) * Split table rows into component so buttons load * Update jslib * Families for enterprise/localizations (#1299) * Add more localizations * Remove unneeded comments * Fix help article * Run linting * Do not show redeem button if no orgs exist to redeem * Implement new process for accepting sponsorships * Hide business checkbox * Update jslib * Removed commented code * Remove commented html * Cleaned up imports * Use proper message * Remove merge conflict message * Remove confusing comment * Listened to PR feedback * Remove unused property * Update help text * Fix aria labels * Add try catch * Made toast before emit * Minor copy changes * Update jslib * Remove unneeded loading Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
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,
canActivate: [AuthGuardService],
2018-06-10 05:33:12 +02:00
children: [
2020-08-20 22:39:05 +02:00
{ path: "", pathMatch: "full", redirectTo: "generator" },
{ path: "import", component: ImportComponent, data: { titleId: "importData" } },
{ path: "export", component: ExportComponent, data: { titleId: "exportVault" } },
2021-12-17 15:57:11 +01:00
{
2018-07-06 04:37:35 +02:00
path: "generator",
component: PasswordGeneratorComponent,
data: { titleId: "passwordGenerator" },
},
{
2018-07-06 04:37:35 +02:00
path: "breach-report",
component: BreachReportComponent,
data: { titleId: "dataBreachReport" },
2021-12-17 15:57:11 +01:00
},
{
2020-08-19 17:15:04 +02:00
path: "reused-passwords-report",
component: ReusedPasswordsReportComponent,
2018-12-11 20:47:41 +01:00
data: { titleId: "reusedPasswordsReport" },
2021-12-17 15:57:11 +01:00
},
{
2018-12-11 21:11:16 +01:00
path: "unsecured-websites-report",
component: UnsecuredWebsitesReportComponent,
data: { titleId: "unsecuredWebsitesReport" },
2021-12-17 15:57:11 +01:00
},
{
2018-12-11 23:49:51 +01:00
path: "weak-passwords-report",
2020-08-19 17:15:04 +02:00
component: WeakPasswordsReportComponent,
data: { titleId: "weakPasswordsReport" },
},
2018-07-06 04:37:35 +02:00
{
path: "exposed-passwords-report",
component: ExposedPasswordsReportComponent,
data: { titleId: "exposedPasswordsReport" },
},
{
path: "inactive-two-factor-report",
component: InactiveTwoFactorReportComponent,
data: { titleId: "inactive2faReport" },
},
2021-12-17 15:57:11 +01:00
],
},
2018-07-12 20:19:47 +02:00
{ path: "setup/families-for-enterprise", component: FamiliesForEnterpriseSetupComponent },
2021-12-17 15:57:11 +01:00
],
},
2018-07-13 22:24:53 +02:00
{
path: "organizations/:organizationId",
component: OrganizationLayoutComponent,
canActivate: [AuthGuardService, OrganizationGuardService],
2018-07-05 20:40:53 +02:00
children: [
2018-07-03 18:34:20 +02:00
{ path: "", pathMatch: "full", redirectTo: "vault" },
2018-07-13 22:24:53 +02:00
{ path: "vault", component: OrgVaultComponent, data: { titleId: "vault" } },
{
2018-07-05 20:40:53 +02:00
path: "tools",
component: OrgToolsComponent,
2018-07-05 21:27:23 +02:00
canActivate: [OrganizationTypeGuardService],
data: { permissions: [Permissions.AccessImportExport, Permissions.AccessReports] },
2018-07-05 20:40:53 +02:00
children: [
2021-12-17 15:57:11 +01:00
{
path: "",
pathMatch: "full",
redirectTo: "import",
2021-12-17 15:57:11 +01:00
},
{
path: "import",
component: OrgImportComponent,
canActivate: [OrganizationTypeGuardService],
data: {
titleId: "importData",
permissions: [Permissions.AccessImportExport],
},
2018-07-13 21:36:27 +02:00
},
{
path: "export",
2018-07-13 22:24:53 +02:00
component: OrgExportComponent,
canActivate: [OrganizationTypeGuardService],
data: {
titleId: "exportVault",
permissions: [Permissions.AccessImportExport],
},
2021-12-17 15:57:11 +01:00
},
2018-07-13 22:24:53 +02:00
{
path: "exposed-passwords-report",
component: OrgExposedPasswordsReportComponent,
canActivate: [OrganizationTypeGuardService],
data: {
titleId: "exposedPasswordsReport",
permissions: [Permissions.AccessReports],
},
2021-12-17 15:57:11 +01:00
},
2018-07-13 22:24:53 +02:00
{
path: "inactive-two-factor-report",
component: OrgInactiveTwoFactorReportComponent,
canActivate: [OrganizationTypeGuardService],
data: {
titleId: "inactive2faReport",
permissions: [Permissions.AccessReports],
},
2021-12-17 15:57:11 +01:00
},
{
path: "reused-passwords-report",
component: OrgReusedPasswordsReportComponent,
canActivate: [OrganizationTypeGuardService],
data: {
titleId: "reusedPasswordsReport",
permissions: [Permissions.AccessReports],
},
2021-12-17 15:57:11 +01:00
},
{
path: "unsecured-websites-report",
component: OrgUnsecuredWebsitesReportComponent,
canActivate: [OrganizationTypeGuardService],
data: {
titleId: "unsecuredWebsitesReport",
permissions: [Permissions.AccessReports],
},
2021-12-17 15:57:11 +01:00
},
{
path: "weak-passwords-report",
component: OrgWeakPasswordsReportComponent,
canActivate: [OrganizationTypeGuardService],
data: {
titleId: "weakPasswordsReport",
permissions: [Permissions.AccessReports],
},
2021-12-17 15:57:11 +01:00
},
2018-06-08 23:08:19 +02:00
],
},
{
path: "manage",
2018-06-10 04:02:45 +02:00
component: OrgManageComponent,
2018-07-05 21:27:23 +02:00
canActivate: [OrganizationTypeGuardService],
2021-12-17 15:57:11 +01:00
data: {
permissions: [
Permissions.CreateNewCollections,
Permissions.EditAnyCollection,
Permissions.DeleteAnyCollection,
Permissions.EditAssignedCollections,
Permissions.DeleteAssignedCollections,
Permissions.AccessEventLogs,
Permissions.ManageGroups,
Permissions.ManageUsers,
Permissions.ManagePolicies,
2021-12-17 15:57:11 +01:00
],
},
2018-06-08 23:08:19 +02:00
children: [
2020-12-11 22:43:28 +01:00
{
2018-06-21 04:27:37 +02:00
path: "",
pathMatch: "full",
redirectTo: "people",
2018-07-06 04:37:35 +02:00
},
{
path: "collections",
component: OrgManageCollectionsComponent,
canActivate: [OrganizationTypeGuardService],
data: {
titleId: "collections",
permissions: [
Permissions.CreateNewCollections,
Feature/families for enterprise (#1300) * Added manual routing * Families for enterprise/account settings (#1290) * Added sponsored families page * Revert "Added manual routing" This reverts commit a970ba78ffa98545176b636630e48115efcf51cc. * Add messages to page * Remove stages and simplify design * Switch to new figma design * Add screen reader * Add calls to server * Reorder methods * Used to organization filters * Connected page to server * Add preliminary text to subscription page * Sponsor existing family organization flow * Update jslib Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Add revoke sponsorship flow * Add spinner to send offer button * Determine if subscription has sponsored items * Work on subscription button * Add message for new family organization * Families for enterprise/subscription page (#1292) * Work on subscription button * Determine if subscription has sponsored items * Work on subscriptions page * Add message for new family organization Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Families for enterprise/redeem card (#1295) * Add toast localization message * Use helpers to property display sponsorship items * Split table rows into component so buttons load (#1296) * Split table rows into component so buttons load * Update jslib * Families for enterprise/localizations (#1299) * Add more localizations * Remove unneeded comments * Fix help article * Run linting * Do not show redeem button if no orgs exist to redeem * Implement new process for accepting sponsorships * Hide business checkbox * Update jslib * Removed commented code * Remove commented html * Cleaned up imports * Use proper message * Remove merge conflict message * Remove confusing comment * Listened to PR feedback * Remove unused property * Update help text * Fix aria labels * Add try catch * Made toast before emit * Minor copy changes * Update jslib * Remove unneeded loading Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2021-11-22 14:41:40 +01:00
Permissions.EditAnyCollection,
Permissions.DeleteAnyCollection,
Permissions.EditAssignedCollections,
Feature/families for enterprise (#1300) * Added manual routing * Families for enterprise/account settings (#1290) * Added sponsored families page * Revert "Added manual routing" This reverts commit a970ba78ffa98545176b636630e48115efcf51cc. * Add messages to page * Remove stages and simplify design * Switch to new figma design * Add screen reader * Add calls to server * Reorder methods * Used to organization filters * Connected page to server * Add preliminary text to subscription page * Sponsor existing family organization flow * Update jslib Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Add revoke sponsorship flow * Add spinner to send offer button * Determine if subscription has sponsored items * Work on subscription button * Add message for new family organization * Families for enterprise/subscription page (#1292) * Work on subscription button * Determine if subscription has sponsored items * Work on subscriptions page * Add message for new family organization Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Families for enterprise/redeem card (#1295) * Add toast localization message * Use helpers to property display sponsorship items * Split table rows into component so buttons load (#1296) * Split table rows into component so buttons load * Update jslib * Families for enterprise/localizations (#1299) * Add more localizations * Remove unneeded comments * Fix help article * Run linting * Do not show redeem button if no orgs exist to redeem * Implement new process for accepting sponsorships * Hide business checkbox * Update jslib * Removed commented code * Remove commented html * Cleaned up imports * Use proper message * Remove merge conflict message * Remove confusing comment * Listened to PR feedback * Remove unused property * Update help text * Fix aria labels * Add try catch * Made toast before emit * Minor copy changes * Update jslib * Remove unneeded loading Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2021-11-22 14:41:40 +01:00
Permissions.DeleteAssignedCollections,
2018-06-21 04:27:37 +02:00
],
},
2018-06-21 00:16:20 +02:00
},
2018-07-06 04:37:35 +02:00
{
path: "events",
component: OrgEventsComponent,
canActivate: [OrganizationTypeGuardService],
2018-12-11 23:49:51 +01:00
data: {
2018-12-14 20:22:30 +01:00
titleId: "eventLogs",
permissions: [Permissions.AccessEventLogs],
2018-06-10 05:33:12 +02:00
},
2018-06-08 23:08:19 +02:00
},
{
path: "groups",
2018-12-14 19:56:01 +01:00
component: OrgGroupsComponent,
canActivate: [OrganizationTypeGuardService],
data: {
titleId: "groups",
permissions: [Permissions.ManageGroups],
2018-07-05 20:40:53 +02:00
},
2018-07-06 16:21:08 +02:00
},
{
path: "people",
component: OrgPeopleComponent,
canActivate: [OrganizationTypeGuardService],
data: {
titleId: "people",
permissions: [Permissions.ManageUsers, Permissions.ManageUsersPassword],
2018-07-06 16:21:08 +02:00
},
2021-12-17 15:57:11 +01:00
},
2018-07-16 18:42:49 +02:00
{
path: "policies",
component: OrgPoliciesComponent,
canActivate: [OrganizationTypeGuardService],
data: {
titleId: "policies",
permissions: [Permissions.ManagePolicies],
2018-07-16 18:42:49 +02:00
},
2021-12-17 15:57:11 +01:00
},
],
},
{
2018-07-18 23:10:26 +02:00
path: "settings",
2018-06-21 04:27:37 +02:00
component: OrgSettingsComponent,
canActivate: [OrganizationTypeGuardService],
data: { permissions: [Permissions.ManageOrganization] },
2018-07-16 18:42:49 +02:00
children: [
{ path: "", pathMatch: "full", redirectTo: "account" },
{ path: "account", component: OrgAccountComponent, data: { titleId: "myOrganization" } },
2021-12-17 15:57:11 +01:00
{
2018-07-18 23:10:26 +02:00
path: "two-factor",
component: OrgTwoFactorSetupComponent,
data: { titleId: "twoStepLogin" },
2021-12-17 15:57:11 +01:00
},
{
2018-07-16 23:17:07 +02:00
path: "billing",
component: OrganizationBillingComponent,
data: { titleId: "billing" },
2021-12-17 15:57:11 +01:00
},
{
path: "subscription",
component: OrganizationSubscriptionComponent,
data: { titleId: "subscription" },
2021-12-17 15:57:11 +01:00
},
2018-06-08 23:08:19 +02:00
],
2018-06-05 05:10:41 +02:00
},
2021-12-17 15:57:11 +01:00
],
},
2018-06-05 05:10:41 +02:00
];
@NgModule({
imports: [
RouterModule.forRoot(routes, {
useHash: true,
paramsInheritanceStrategy: "always",
2018-06-05 05:10:41 +02:00
/*enableTracing: true,*/
}),
],
exports: [RouterModule],
})
export class OssRoutingModule {}