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';
|
|
|
|
|
2020-12-22 16:57:44 +01:00
|
|
|
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';
|
2018-06-09 19:59:09 +02:00
|
|
|
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';
|
2020-08-19 17:15:04 +02:00
|
|
|
import { SetPasswordComponent } from './accounts/set-password.component';
|
2020-07-16 15:18:25 +02:00
|
|
|
import { SsoComponent } from './accounts/sso.component';
|
2018-06-05 21:02:53 +02:00
|
|
|
import { TwoFactorComponent } from './accounts/two-factor.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';
|
2019-02-18 21:28:23 +01:00
|
|
|
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
|
|
|
|
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
|
|
|
|
2020-11-04 20:49:08 +01: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';
|
2018-07-04 15:55:52 +02:00
|
|
|
import { OrganizationsComponent } from './settings/organizations.component';
|
2018-07-03 15:27:59 +02:00
|
|
|
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';
|
2019-02-18 21:28:23 +01:00
|
|
|
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
|
|
|
|
2021-06-07 20:13:58 +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
|
|
|
|
2021-06-07 20:13:58 +02:00
|
|
|
import { Permissions } from 'jslib-common/enums/permissions';
|
2021-01-12 21:31:22 +01:00
|
|
|
|
2020-12-22 16:57:44 +01:00
|
|
|
import { EmergencyAccessViewComponent } from './settings/emergency-access-view.component';
|
2021-01-12 21:31:22 +01:00
|
|
|
import { EmergencyAccessComponent } from './settings/emergency-access.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] },
|
2018-07-06 04:37:35 +02:00
|
|
|
{
|
|
|
|
path: 'register', component: RegisterComponent,
|
|
|
|
canActivate: [UnauthGuardService],
|
|
|
|
data: { titleId: 'createAccount' },
|
|
|
|
},
|
2020-07-16 15:18:25 +02:00
|
|
|
{
|
|
|
|
path: 'sso', component: SsoComponent,
|
|
|
|
canActivate: [UnauthGuardService],
|
2020-08-20 22:39:05 +02:00
|
|
|
data: { titleId: 'enterpriseSingleSignOn' },
|
2020-07-16 15:18:25 +02:00
|
|
|
},
|
2020-08-13 20:32:07 +02: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' },
|
|
|
|
},
|
2018-07-06 04:37:35 +02:00
|
|
|
{
|
|
|
|
path: 'hint', component: HintComponent,
|
|
|
|
canActivate: [UnauthGuardService],
|
|
|
|
data: { titleId: 'passwordHint' },
|
|
|
|
},
|
2021-04-22 10:13:43 +02:00
|
|
|
{
|
|
|
|
path: 'lock',
|
|
|
|
component: LockComponent,
|
|
|
|
canActivate: [LockGuardService],
|
|
|
|
},
|
2018-07-12 20:19:47 +02:00
|
|
|
{ path: 'verify-email', component: VerifyEmailTokenComponent },
|
2018-07-13 22:24:53 +02:00
|
|
|
{
|
|
|
|
path: 'accept-organization',
|
|
|
|
component: AcceptOrganizationComponent,
|
|
|
|
data: { titleId: 'joinOrganization' },
|
|
|
|
},
|
2020-12-22 16:57:44 +01:00
|
|
|
{
|
|
|
|
path: 'accept-emergency',
|
|
|
|
component: AcceptEmergencyComponent,
|
|
|
|
data: { titleId: 'acceptEmergency' },
|
|
|
|
},
|
2018-07-13 21:36:27 +02:00
|
|
|
{ path: 'recover', pathMatch: 'full', redirectTo: 'recover-2fa' },
|
2018-07-13 22:24:53 +02:00
|
|
|
{
|
|
|
|
path: 'recover-2fa',
|
|
|
|
component: RecoverTwoFactorComponent,
|
|
|
|
canActivate: [UnauthGuardService],
|
|
|
|
data: { titleId: 'recoverAccountTwoStep' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'recover-delete',
|
|
|
|
component: RecoverDeleteComponent,
|
|
|
|
canActivate: [UnauthGuardService],
|
|
|
|
data: { titleId: 'deleteAccount' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'verify-recover-delete',
|
|
|
|
component: VerifyRecoverDeleteComponent,
|
|
|
|
canActivate: [UnauthGuardService],
|
|
|
|
data: { titleId: 'deleteAccount' },
|
|
|
|
},
|
2021-01-22 23:03:55 +01:00
|
|
|
{
|
2020-11-04 20:49:08 +01:00
|
|
|
path: 'send/:sendId/:key',
|
|
|
|
component: AccessComponent,
|
|
|
|
data: { title: 'Bitwarden Send' },
|
2021-01-22 23:03:55 +01:00
|
|
|
},
|
2018-06-08 23:08:19 +02:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '',
|
2018-06-10 04:02:45 +02:00
|
|
|
component: UserLayoutComponent,
|
2018-07-05 21:27:23 +02:00
|
|
|
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' } },
|
2018-06-21 04:27:37 +02:00
|
|
|
{
|
|
|
|
path: 'settings',
|
|
|
|
component: SettingsComponent,
|
|
|
|
children: [
|
|
|
|
{ path: '', pathMatch: 'full', redirectTo: 'account' },
|
2018-07-06 04:37:35 +02:00
|
|
|
{ path: 'account', component: AccountComponent, data: { titleId: 'myAccount' } },
|
|
|
|
{ path: 'options', component: OptionsComponent, data: { titleId: 'options' } },
|
|
|
|
{ path: 'domain-rules', component: DomainRulesComponent, data: { titleId: 'domainRules' } },
|
|
|
|
{ path: 'two-factor', component: TwoFactorSetupComponent, data: { titleId: 'twoStepLogin' } },
|
|
|
|
{ path: 'premium', component: PremiumComponent, data: { titleId: 'goPremium' } },
|
2019-02-18 21:28:23 +01:00
|
|
|
{ path: 'billing', component: UserBillingComponent, data: { titleId: 'billing' } },
|
|
|
|
{
|
|
|
|
path: 'subscription',
|
|
|
|
component: UserSubscriptionComponent,
|
|
|
|
data: { titleId: 'premiumMembership' },
|
|
|
|
},
|
2018-07-06 04:37:35 +02:00
|
|
|
{ path: 'organizations', component: OrganizationsComponent, data: { titleId: 'organizations' } },
|
|
|
|
{
|
|
|
|
path: 'create-organization',
|
|
|
|
component: CreateOrganizationComponent,
|
|
|
|
data: { titleId: 'newOrganization' },
|
|
|
|
},
|
2020-12-22 16:57:44 +01:00
|
|
|
{
|
|
|
|
path: 'emergency-access',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: EmergencyAccessComponent,
|
2021-06-02 18:35:49 +02:00
|
|
|
data: { titleId: 'emergencyAccess' },
|
2020-12-22 16:57:44 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: ':id',
|
|
|
|
component: EmergencyAccessViewComponent,
|
2021-06-02 18:35:49 +02:00
|
|
|
data: { titleId: 'emergencyAccess' },
|
2020-12-22 16:57:44 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2018-06-21 04:27:37 +02:00
|
|
|
],
|
|
|
|
},
|
2018-06-10 05:33:12 +02:00
|
|
|
{
|
|
|
|
path: 'tools',
|
|
|
|
component: ToolsComponent,
|
2018-07-05 21:27:23 +02:00
|
|
|
canActivate: [AuthGuardService],
|
2018-06-10 05:33:12 +02:00
|
|
|
children: [
|
2018-06-21 00:16:20 +02:00
|
|
|
{ path: '', pathMatch: 'full', redirectTo: 'generator' },
|
2018-07-06 04:37:35 +02:00
|
|
|
{ path: 'import', component: ImportComponent, data: { titleId: 'importData' } },
|
|
|
|
{ path: 'export', component: ExportComponent, data: { titleId: 'exportVault' } },
|
|
|
|
{
|
|
|
|
path: 'generator',
|
|
|
|
component: PasswordGeneratorComponent,
|
|
|
|
data: { titleId: 'passwordGenerator' },
|
|
|
|
},
|
|
|
|
{ path: 'breach-report', component: BreachReportComponent, data: { titleId: 'dataBreachReport' } },
|
2018-12-11 20:47:41 +01:00
|
|
|
{
|
|
|
|
path: 'reused-passwords-report',
|
|
|
|
component: ReusedPasswordsReportComponent,
|
|
|
|
data: { titleId: 'reusedPasswordsReport' },
|
|
|
|
},
|
2018-12-11 21:11:16 +01:00
|
|
|
{
|
|
|
|
path: 'unsecured-websites-report',
|
|
|
|
component: UnsecuredWebsitesReportComponent,
|
|
|
|
data: { titleId: 'unsecuredWebsitesReport' },
|
|
|
|
},
|
2018-12-11 23:49:51 +01:00
|
|
|
{
|
|
|
|
path: 'weak-passwords-report',
|
|
|
|
component: WeakPasswordsReportComponent,
|
|
|
|
data: { titleId: 'weakPasswordsReport' },
|
|
|
|
},
|
2018-12-12 04:09:16 +01:00
|
|
|
{
|
|
|
|
path: 'exposed-passwords-report',
|
|
|
|
component: ExposedPasswordsReportComponent,
|
|
|
|
data: { titleId: 'exposedPasswordsReport' },
|
2018-12-12 05:25:05 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'inactive-two-factor-report',
|
|
|
|
component: InactiveTwoFactorReportComponent,
|
2018-12-14 20:22:30 +01:00
|
|
|
data: { titleId: 'inactive2faReport' },
|
2018-12-12 04:09:16 +01:00
|
|
|
},
|
2018-06-10 05:33:12 +02:00
|
|
|
],
|
|
|
|
},
|
2018-06-08 23:08:19 +02:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
2018-07-03 18:34:20 +02:00
|
|
|
path: 'organizations/:organizationId',
|
2018-06-08 23:08:19 +02:00
|
|
|
component: OrganizationLayoutComponent,
|
2018-07-05 21:27:23 +02:00
|
|
|
canActivate: [AuthGuardService, OrganizationGuardService],
|
2018-06-08 23:08:19 +02:00
|
|
|
children: [
|
2018-07-03 18:34:20 +02:00
|
|
|
{ path: '', pathMatch: 'full', redirectTo: 'vault' },
|
2018-07-06 04:37:35 +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],
|
2021-01-12 21:31:22 +01:00
|
|
|
data: { permissions: [Permissions.AccessImportExport, Permissions.AccessReports] },
|
2018-07-05 20:40:53 +02:00
|
|
|
children: [
|
2021-01-12 21:31:22 +01:00
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
pathMatch: 'full',
|
|
|
|
redirectTo: 'import',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'import',
|
|
|
|
component: OrgImportComponent,
|
|
|
|
canActivate: [OrganizationTypeGuardService],
|
|
|
|
data: {
|
|
|
|
titleId: 'importData',
|
|
|
|
permissions: [Permissions.AccessImportExport],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'export',
|
|
|
|
component: OrgExportComponent,
|
|
|
|
canActivate: [OrganizationTypeGuardService],
|
|
|
|
data: {
|
|
|
|
titleId: 'exportVault',
|
|
|
|
permissions: [Permissions.AccessImportExport],
|
|
|
|
},
|
|
|
|
},
|
2018-12-14 19:56:01 +01:00
|
|
|
{
|
|
|
|
path: 'exposed-passwords-report',
|
|
|
|
component: OrgExposedPasswordsReportComponent,
|
2021-01-12 21:31:22 +01:00
|
|
|
canActivate: [OrganizationTypeGuardService],
|
|
|
|
data: {
|
|
|
|
titleId: 'exposedPasswordsReport',
|
|
|
|
permissions: [Permissions.AccessReports],
|
|
|
|
},
|
2018-12-14 19:56:01 +01:00
|
|
|
},
|
2018-12-14 20:22:30 +01:00
|
|
|
{
|
|
|
|
path: 'inactive-two-factor-report',
|
|
|
|
component: OrgInactiveTwoFactorReportComponent,
|
2021-01-12 21:31:22 +01:00
|
|
|
canActivate: [OrganizationTypeGuardService],
|
|
|
|
data: {
|
|
|
|
titleId: 'inactive2faReport',
|
|
|
|
permissions: [Permissions.AccessReports],
|
|
|
|
},
|
2018-12-14 20:22:30 +01:00
|
|
|
},
|
2018-12-14 20:42:04 +01:00
|
|
|
{
|
|
|
|
path: 'reused-passwords-report',
|
|
|
|
component: OrgReusedPasswordsReportComponent,
|
2021-01-12 21:31:22 +01:00
|
|
|
canActivate: [OrganizationTypeGuardService],
|
|
|
|
data: {
|
|
|
|
titleId: 'reusedPasswordsReport',
|
|
|
|
permissions: [Permissions.AccessReports],
|
|
|
|
},
|
2018-12-14 20:42:04 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'unsecured-websites-report',
|
|
|
|
component: OrgUnsecuredWebsitesReportComponent,
|
2021-01-12 21:31:22 +01:00
|
|
|
canActivate: [OrganizationTypeGuardService],
|
|
|
|
data: {
|
|
|
|
titleId: 'unsecuredWebsitesReport',
|
|
|
|
permissions: [Permissions.AccessReports],
|
|
|
|
},
|
2018-12-14 20:42:04 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'weak-passwords-report',
|
|
|
|
component: OrgWeakPasswordsReportComponent,
|
2021-01-12 21:31:22 +01:00
|
|
|
canActivate: [OrganizationTypeGuardService],
|
|
|
|
data: {
|
|
|
|
titleId: 'weakPasswordsReport',
|
|
|
|
permissions: [Permissions.AccessReports],
|
|
|
|
},
|
2018-12-14 20:42:04 +01:00
|
|
|
},
|
2018-07-05 20:40:53 +02:00
|
|
|
],
|
|
|
|
},
|
2018-07-06 16:21:08 +02:00
|
|
|
{
|
|
|
|
path: 'manage',
|
|
|
|
component: OrgManageComponent,
|
|
|
|
canActivate: [OrganizationTypeGuardService],
|
2018-10-17 16:53:04 +02:00
|
|
|
data: {
|
2021-01-12 21:31:22 +01:00
|
|
|
permissions: [
|
|
|
|
Permissions.ManageAssignedCollections,
|
|
|
|
Permissions.ManageAllCollections,
|
|
|
|
Permissions.AccessEventLogs,
|
|
|
|
Permissions.ManageGroups,
|
|
|
|
Permissions.ManageUsers,
|
|
|
|
Permissions.ManagePolicies,
|
2018-10-17 17:23:01 +02:00
|
|
|
],
|
2018-10-17 16:53:04 +02:00
|
|
|
},
|
2018-07-06 16:21:08 +02:00
|
|
|
children: [
|
2021-01-12 21:31:22 +01:00
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
pathMatch: 'full',
|
|
|
|
redirectTo: 'people',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'collections',
|
|
|
|
component: OrgManageCollectionsComponent,
|
|
|
|
canActivate: [OrganizationTypeGuardService],
|
|
|
|
data: {
|
|
|
|
titleId: 'collections',
|
|
|
|
permissions: [Permissions.ManageAssignedCollections, Permissions.ManageAllCollections],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'events',
|
|
|
|
component: OrgEventsComponent,
|
|
|
|
canActivate: [OrganizationTypeGuardService],
|
|
|
|
data: {
|
|
|
|
titleId: 'eventLogs',
|
|
|
|
permissions: [Permissions.AccessEventLogs],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'groups',
|
|
|
|
component: OrgGroupsComponent,
|
|
|
|
canActivate: [OrganizationTypeGuardService],
|
|
|
|
data: {
|
|
|
|
titleId: 'groups',
|
|
|
|
permissions: [Permissions.ManageGroups],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'people',
|
|
|
|
component: OrgPeopleComponent,
|
|
|
|
canActivate: [OrganizationTypeGuardService],
|
|
|
|
data: {
|
|
|
|
titleId: 'people',
|
2021-06-02 18:35:49 +02:00
|
|
|
permissions: [Permissions.ManageUsers, Permissions.ManageUsersPassword],
|
2021-01-12 21:31:22 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'policies',
|
|
|
|
component: OrgPoliciesComponent,
|
|
|
|
canActivate: [OrganizationTypeGuardService],
|
|
|
|
data: {
|
|
|
|
titleId: 'policies',
|
|
|
|
permissions: [Permissions.ManagePolicies],
|
|
|
|
},
|
|
|
|
},
|
2018-07-06 16:21:08 +02:00
|
|
|
],
|
|
|
|
},
|
2018-07-16 18:42:49 +02:00
|
|
|
{
|
|
|
|
path: 'settings',
|
|
|
|
component: OrgSettingsComponent,
|
|
|
|
canActivate: [OrganizationTypeGuardService],
|
2021-01-12 21:31:22 +01:00
|
|
|
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' } },
|
2018-07-18 23:10:26 +02:00
|
|
|
{ path: 'two-factor', component: OrgTwoFactorSetupComponent, data: { titleId: 'twoStepLogin' } },
|
2018-07-16 23:17:07 +02:00
|
|
|
{
|
|
|
|
path: 'billing',
|
|
|
|
component: OrganizationBillingComponent,
|
2019-02-18 21:28:23 +01:00
|
|
|
data: { titleId: 'billing' },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'subscription',
|
|
|
|
component: OrganizationSubscriptionComponent,
|
|
|
|
data: { titleId: 'subscription' },
|
2018-07-16 23:17:07 +02:00
|
|
|
},
|
2018-07-16 18:42:49 +02:00
|
|
|
],
|
|
|
|
},
|
2018-06-08 23:08:19 +02:00
|
|
|
],
|
2018-06-05 05:10:41 +02:00
|
|
|
},
|
2018-06-08 23:08:19 +02:00
|
|
|
{ path: '**', redirectTo: '' },
|
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',
|
2018-06-05 05:10:41 +02:00
|
|
|
/*enableTracing: true,*/
|
|
|
|
})],
|
|
|
|
exports: [RouterModule],
|
|
|
|
})
|
|
|
|
export class AppRoutingModule { }
|