mirror of
https://github.com/bitwarden/web
synced 2025-12-10 13:23:15 +00:00
Compare commits
42 Commits
refactor/o
...
v2022.5.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7cee309ba | ||
|
|
d886a056fa | ||
|
|
06227f27ab | ||
|
|
66391b4376 | ||
|
|
1c09629bbc | ||
|
|
e2d9498167 | ||
|
|
ec80782d8f | ||
|
|
3acee89646 | ||
|
|
589faf3608 | ||
|
|
639cc461ae | ||
|
|
4562920d30 | ||
|
|
c6f4e4de64 | ||
|
|
f323963a4e | ||
|
|
f6c8b6d8cb | ||
|
|
11f34be18e | ||
|
|
647e9555d0 | ||
|
|
ad7b6e6388 | ||
|
|
718ca197b5 | ||
|
|
338d593cd1 | ||
|
|
aa29a07678 | ||
|
|
0722522801 | ||
|
|
5731c6449b | ||
|
|
eaf083be44 | ||
|
|
8435c85c3c | ||
|
|
3d1c2dad74 | ||
|
|
2f632f7096 | ||
|
|
9b63c81b56 | ||
|
|
34cb463e94 | ||
|
|
7bbe3d7b28 | ||
|
|
0564b52f1f | ||
|
|
cb1f08d74b | ||
|
|
f3bf972d26 | ||
|
|
02256aad87 | ||
|
|
466e0c8c35 | ||
|
|
0543e76432 | ||
|
|
34527160fc | ||
|
|
f590fe5435 | ||
|
|
0f64c16c18 | ||
|
|
1632a24b1e | ||
|
|
0691af1dcd | ||
|
|
3e59617fb1 | ||
|
|
268b16ca98 |
@@ -22,16 +22,14 @@ const routes: Routes = [
|
|||||||
component: ManageComponent,
|
component: ManageComponent,
|
||||||
canActivate: [PermissionsGuard],
|
canActivate: [PermissionsGuard],
|
||||||
data: {
|
data: {
|
||||||
permissions: NavigationPermissionsService.getPermissions("manage"),
|
permissions: NavigationPermissionsService.getPermissions("manage").concat(
|
||||||
|
Permissions.ManageSso
|
||||||
|
),
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "sso",
|
path: "sso",
|
||||||
component: SsoComponent,
|
component: SsoComponent,
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
permissions: [Permissions.ManageSso],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
|
import { CommonModule } from "@angular/common";
|
||||||
import { ComponentFactoryResolver, NgModule } from "@angular/core";
|
import { ComponentFactoryResolver, NgModule } from "@angular/core";
|
||||||
|
import { FormsModule } from "@angular/forms";
|
||||||
|
|
||||||
|
import { JslibModule } from "jslib-angular/jslib.module";
|
||||||
import { ModalService } from "jslib-angular/services/modal.service";
|
import { ModalService } from "jslib-angular/services/modal.service";
|
||||||
|
|
||||||
import { LayoutsModule } from "src/app/layouts/layouts.module";
|
import { OssModule } from "src/app/oss.module";
|
||||||
import { SharedModule } from "src/app/modules/shared.module";
|
|
||||||
|
|
||||||
import { AddOrganizationComponent } from "./clients/add-organization.component";
|
import { AddOrganizationComponent } from "./clients/add-organization.component";
|
||||||
import { ClientsComponent } from "./clients/clients.component";
|
import { ClientsComponent } from "./clients/clients.component";
|
||||||
@@ -26,7 +28,7 @@ import { SetupProviderComponent } from "./setup/setup-provider.component";
|
|||||||
import { SetupComponent } from "./setup/setup.component";
|
import { SetupComponent } from "./setup/setup.component";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [SharedModule, LayoutsModule, ProvidersRoutingModule],
|
imports: [CommonModule, FormsModule, OssModule, JslibModule, ProvidersRoutingModule],
|
||||||
declarations: [
|
declarations: [
|
||||||
AcceptProviderComponent,
|
AcceptProviderComponent,
|
||||||
AccountComponent,
|
AccountComponent,
|
||||||
|
|||||||
2
jslib
2
jslib
Submodule jslib updated: 0d658ba26d...6f117b9901
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@bitwarden/web-vault",
|
"name": "@bitwarden/web-vault",
|
||||||
"version": "2022.05.0",
|
"version": "2022.5.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@bitwarden/web-vault",
|
"name": "@bitwarden/web-vault",
|
||||||
"version": "2022.05.0",
|
"version": "2022.5.2",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@bitwarden/web-vault",
|
"name": "@bitwarden/web-vault",
|
||||||
"version": "2022.05.0",
|
"version": "2022.5.2",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": "https://github.com/bitwarden/web",
|
"repository": "https://github.com/bitwarden/web",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
<div [ngClass]="{ 'col-5': layout, 'col-12': !layout }">
|
<div [ngClass]="{ 'col-5': layout, 'col-12': !layout }">
|
||||||
<div class="row justify-content-md-center mt-5">
|
<div class="row justify-content-md-center mt-5">
|
||||||
<div [ngClass]="{ 'col-5': !layout, 'col-12': layout }">
|
<div [ngClass]="{ 'col-5': !layout, 'col-12': layout }">
|
||||||
<h1 class="lead text-center mb-4" *ngIf="!layout">{{ "createAccount" | i18n }}</h1>
|
<p class="lead text-center mb-4" *ngIf="!layout">{{ "createAccount" | i18n }}</p>
|
||||||
<div class="card d-block">
|
<div class="card d-block">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<app-callout
|
<app-callout
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { OrganizationService } from "jslib-common/abstractions/organization.serv
|
|||||||
import { Utils } from "jslib-common/misc/utils";
|
import { Utils } from "jslib-common/misc/utils";
|
||||||
import { Organization } from "jslib-common/models/domain/organization";
|
import { Organization } from "jslib-common/models/domain/organization";
|
||||||
|
|
||||||
import { NavigationPermissionsService } from "../services/navigation-permissions.service";
|
import { NavigationPermissionsService } from "../organizations/services/navigation-permissions.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-organization-switcher",
|
selector: "app-organization-switcher",
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="container footer text-muted">
|
<div class="container footer text-muted">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">© {{ year }} Bitwarden Inc.</div>
|
<div class="col">© {{ year }}, Bitwarden Inc.</div>
|
||||||
<div class="col text-center"></div>
|
<div class="col text-center"></div>
|
||||||
<div class="col text-right">
|
<div class="col text-right">
|
||||||
{{ "versionNumber" | i18n: version }}
|
{{ "versionNumber" | i18n: version }}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
<div class="container my-5 text-muted text-center">
|
<div class="container my-5 text-muted text-center">
|
||||||
© {{ year }} Bitwarden Inc. <br />
|
© {{ year }}, Bitwarden Inc. <br />
|
||||||
{{ "versionNumber" | i18n: version }}
|
{{ "versionNumber" | i18n: version }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
import { NgModule } from "@angular/core";
|
|
||||||
|
|
||||||
import { FooterComponent } from "../layouts/footer.component";
|
|
||||||
import { FrontendLayoutComponent } from "../layouts/frontend-layout.component";
|
|
||||||
import { NavbarComponent } from "../layouts/navbar.component";
|
|
||||||
import { SharedModule } from "../modules/shared.module";
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [SharedModule],
|
|
||||||
declarations: [NavbarComponent, FooterComponent, FrontendLayoutComponent],
|
|
||||||
exports: [NavbarComponent, FooterComponent],
|
|
||||||
})
|
|
||||||
export class LayoutsModule {}
|
|
||||||
@@ -20,10 +20,67 @@ import { UpdateTempPasswordComponent } from "../accounts/update-temp-password.co
|
|||||||
import { VerifyEmailTokenComponent } from "../accounts/verify-email-token.component";
|
import { VerifyEmailTokenComponent } from "../accounts/verify-email-token.component";
|
||||||
import { VerifyRecoverDeleteComponent } from "../accounts/verify-recover-delete.component";
|
import { VerifyRecoverDeleteComponent } from "../accounts/verify-recover-delete.component";
|
||||||
import { NestedCheckboxComponent } from "../components/nested-checkbox.component";
|
import { NestedCheckboxComponent } from "../components/nested-checkbox.component";
|
||||||
|
import { OrganizationSwitcherComponent } from "../components/organization-switcher.component";
|
||||||
import { PasswordRepromptComponent } from "../components/password-reprompt.component";
|
import { PasswordRepromptComponent } from "../components/password-reprompt.component";
|
||||||
|
import { PasswordStrengthComponent } from "../components/password-strength.component";
|
||||||
import { PremiumBadgeComponent } from "../components/premium-badge.component";
|
import { PremiumBadgeComponent } from "../components/premium-badge.component";
|
||||||
import { LayoutsModule } from "../layouts/layouts.module";
|
import { FooterComponent } from "../layouts/footer.component";
|
||||||
|
import { FrontendLayoutComponent } from "../layouts/frontend-layout.component";
|
||||||
|
import { NavbarComponent } from "../layouts/navbar.component";
|
||||||
import { UserLayoutComponent } from "../layouts/user-layout.component";
|
import { UserLayoutComponent } from "../layouts/user-layout.component";
|
||||||
|
import { OrganizationLayoutComponent } from "../organizations/layouts/organization-layout.component";
|
||||||
|
import { BulkConfirmComponent as OrgBulkConfirmComponent } from "../organizations/manage/bulk/bulk-confirm.component";
|
||||||
|
import { BulkRemoveComponent as OrgBulkRemoveComponent } from "../organizations/manage/bulk/bulk-remove.component";
|
||||||
|
import { BulkStatusComponent as OrgBulkStatusComponent } from "../organizations/manage/bulk/bulk-status.component";
|
||||||
|
import { CollectionAddEditComponent as OrgCollectionAddEditComponent } from "../organizations/manage/collection-add-edit.component";
|
||||||
|
import { CollectionsComponent as OrgManageCollectionsComponent } from "../organizations/manage/collections.component";
|
||||||
|
import { EntityEventsComponent as OrgEntityEventsComponent } from "../organizations/manage/entity-events.component";
|
||||||
|
import { EntityUsersComponent as OrgEntityUsersComponent } from "../organizations/manage/entity-users.component";
|
||||||
|
import { EventsComponent as OrgEventsComponent } from "../organizations/manage/events.component";
|
||||||
|
import { GroupAddEditComponent as OrgGroupAddEditComponent } from "../organizations/manage/group-add-edit.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";
|
||||||
|
import { PoliciesComponent as OrgPoliciesComponent } from "../organizations/manage/policies.component";
|
||||||
|
import { PolicyEditComponent as OrgPolicyEditComponent } from "../organizations/manage/policy-edit.component";
|
||||||
|
import { ResetPasswordComponent as OrgResetPasswordComponent } from "../organizations/manage/reset-password.component";
|
||||||
|
import { UserAddEditComponent as OrgUserAddEditComponent } from "../organizations/manage/user-add-edit.component";
|
||||||
|
import { UserConfirmComponent as OrgUserConfirmComponent } from "../organizations/manage/user-confirm.component";
|
||||||
|
import { UserGroupsComponent as OrgUserGroupsComponent } from "../organizations/manage/user-groups.component";
|
||||||
|
import { DisableSendPolicyComponent } from "../organizations/policies/disable-send.component";
|
||||||
|
import { MasterPasswordPolicyComponent } from "../organizations/policies/master-password.component";
|
||||||
|
import { PasswordGeneratorPolicyComponent } from "../organizations/policies/password-generator.component";
|
||||||
|
import { PersonalOwnershipPolicyComponent } from "../organizations/policies/personal-ownership.component";
|
||||||
|
import { RequireSsoPolicyComponent } from "../organizations/policies/require-sso.component";
|
||||||
|
import { ResetPasswordPolicyComponent } from "../organizations/policies/reset-password.component";
|
||||||
|
import { SendOptionsPolicyComponent } from "../organizations/policies/send-options.component";
|
||||||
|
import { SingleOrgPolicyComponent } from "../organizations/policies/single-org.component";
|
||||||
|
import { TwoFactorAuthenticationPolicyComponent } from "../organizations/policies/two-factor-authentication.component";
|
||||||
|
import { AccountComponent as OrgAccountComponent } from "../organizations/settings/account.component";
|
||||||
|
import { AdjustSubscription } from "../organizations/settings/adjust-subscription.component";
|
||||||
|
import { BillingSyncApiKeyComponent } from "../organizations/settings/billing-sync-api-key.component";
|
||||||
|
import { ChangePlanComponent } from "../organizations/settings/change-plan.component";
|
||||||
|
import { DeleteOrganizationComponent } from "../organizations/settings/delete-organization.component";
|
||||||
|
import { DownloadLicenseComponent } from "../organizations/settings/download-license.component";
|
||||||
|
import { ImageSubscriptionHiddenComponent as OrgSubscriptionHiddenComponent } from "../organizations/settings/image-subscription-hidden.component";
|
||||||
|
import { OrganizationBillingComponent } from "../organizations/settings/organization-billing.component";
|
||||||
|
import { OrganizationSubscriptionComponent } from "../organizations/settings/organization-subscription.component";
|
||||||
|
import { SettingsComponent as OrgSettingComponent } from "../organizations/settings/settings.component";
|
||||||
|
import { TwoFactorSetupComponent as OrgTwoFactorSetupComponent } from "../organizations/settings/two-factor-setup.component";
|
||||||
|
import { AcceptFamilySponsorshipComponent } from "../organizations/sponsorships/accept-family-sponsorship.component";
|
||||||
|
import { FamiliesForEnterpriseSetupComponent } from "../organizations/sponsorships/families-for-enterprise-setup.component";
|
||||||
|
import { ExportComponent as OrgExportComponent } from "../organizations/tools/export.component";
|
||||||
|
import { ExposedPasswordsReportComponent as OrgExposedPasswordsReportComponent } from "../organizations/tools/exposed-passwords-report.component";
|
||||||
|
import { ImportComponent as OrgImportComponent } from "../organizations/tools/import.component";
|
||||||
|
import { InactiveTwoFactorReportComponent as OrgInactiveTwoFactorReportComponent } from "../organizations/tools/inactive-two-factor-report.component";
|
||||||
|
import { ReusedPasswordsReportComponent as OrgReusedPasswordsReportComponent } from "../organizations/tools/reused-passwords-report.component";
|
||||||
|
import { ToolsComponent as OrgToolsComponent } from "../organizations/tools/tools.component";
|
||||||
|
import { UnsecuredWebsitesReportComponent as OrgUnsecuredWebsitesReportComponent } from "../organizations/tools/unsecured-websites-report.component";
|
||||||
|
import { WeakPasswordsReportComponent as OrgWeakPasswordsReportComponent } from "../organizations/tools/weak-passwords-report.component";
|
||||||
|
import { AddEditComponent as OrgAddEditComponent } from "../organizations/vault/add-edit.component";
|
||||||
|
import { AttachmentsComponent as OrgAttachmentsComponent } from "../organizations/vault/attachments.component";
|
||||||
|
import { CiphersComponent as OrgCiphersComponent } from "../organizations/vault/ciphers.component";
|
||||||
|
import { CollectionsComponent as OrgCollectionsComponent } from "../organizations/vault/collections.component";
|
||||||
import { ProvidersComponent } from "../providers/providers.component";
|
import { ProvidersComponent } from "../providers/providers.component";
|
||||||
import { BreachReportComponent } from "../reports/breach-report.component";
|
import { BreachReportComponent } from "../reports/breach-report.component";
|
||||||
import { ExposedPasswordsReportComponent } from "../reports/exposed-passwords-report.component";
|
import { ExposedPasswordsReportComponent } from "../reports/exposed-passwords-report.component";
|
||||||
@@ -58,7 +115,9 @@ import { EmergencyAccessTakeoverComponent } from "../settings/emergency-access-t
|
|||||||
import { EmergencyAccessViewComponent } from "../settings/emergency-access-view.component";
|
import { EmergencyAccessViewComponent } from "../settings/emergency-access-view.component";
|
||||||
import { EmergencyAccessComponent } from "../settings/emergency-access.component";
|
import { EmergencyAccessComponent } from "../settings/emergency-access.component";
|
||||||
import { EmergencyAddEditComponent } from "../settings/emergency-add-edit.component";
|
import { EmergencyAddEditComponent } from "../settings/emergency-add-edit.component";
|
||||||
|
import { OrganizationPlansComponent } from "../settings/organization-plans.component";
|
||||||
import { PaymentMethodComponent } from "../settings/payment-method.component";
|
import { PaymentMethodComponent } from "../settings/payment-method.component";
|
||||||
|
import { PaymentComponent } from "../settings/payment.component";
|
||||||
import { PreferencesComponent } from "../settings/preferences.component";
|
import { PreferencesComponent } from "../settings/preferences.component";
|
||||||
import { PremiumComponent } from "../settings/premium.component";
|
import { PremiumComponent } from "../settings/premium.component";
|
||||||
import { ProfileComponent } from "../settings/profile.component";
|
import { ProfileComponent } from "../settings/profile.component";
|
||||||
@@ -110,10 +169,11 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
|
|||||||
// Please do not add to this list of declarations - we should refactor these into modules when doing so makes sense until there are none left.
|
// Please do not add to this list of declarations - we should refactor these into modules when doing so makes sense until there are none left.
|
||||||
// If you are building new functionality, please create or extend a feature module instead.
|
// If you are building new functionality, please create or extend a feature module instead.
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [SharedModule, VaultFilterModule, OrganizationBadgeModule, PipesModule, LayoutsModule],
|
imports: [SharedModule, VaultFilterModule, OrganizationBadgeModule, PipesModule],
|
||||||
declarations: [
|
declarations: [
|
||||||
PremiumBadgeComponent,
|
PremiumBadgeComponent,
|
||||||
AcceptEmergencyComponent,
|
AcceptEmergencyComponent,
|
||||||
|
AcceptFamilySponsorshipComponent,
|
||||||
AcceptOrganizationComponent,
|
AcceptOrganizationComponent,
|
||||||
AccessComponent,
|
AccessComponent,
|
||||||
AccountComponent,
|
AccountComponent,
|
||||||
@@ -123,8 +183,10 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
|
|||||||
AddEditCustomFieldsComponent,
|
AddEditCustomFieldsComponent,
|
||||||
AdjustPaymentComponent,
|
AdjustPaymentComponent,
|
||||||
AdjustStorageComponent,
|
AdjustStorageComponent,
|
||||||
|
AdjustSubscription,
|
||||||
ApiKeyComponent,
|
ApiKeyComponent,
|
||||||
AttachmentsComponent,
|
AttachmentsComponent,
|
||||||
|
BillingSyncApiKeyComponent,
|
||||||
BillingSyncKeyComponent,
|
BillingSyncKeyComponent,
|
||||||
BreachReportComponent,
|
BreachReportComponent,
|
||||||
BulkActionsComponent,
|
BulkActionsComponent,
|
||||||
@@ -135,12 +197,16 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
|
|||||||
ChangeEmailComponent,
|
ChangeEmailComponent,
|
||||||
ChangeKdfComponent,
|
ChangeKdfComponent,
|
||||||
ChangePasswordComponent,
|
ChangePasswordComponent,
|
||||||
|
ChangePlanComponent,
|
||||||
CiphersComponent,
|
CiphersComponent,
|
||||||
CollectionsComponent,
|
CollectionsComponent,
|
||||||
CreateOrganizationComponent,
|
CreateOrganizationComponent,
|
||||||
DeauthorizeSessionsComponent,
|
DeauthorizeSessionsComponent,
|
||||||
DeleteAccountComponent,
|
DeleteAccountComponent,
|
||||||
|
DeleteOrganizationComponent,
|
||||||
|
DisableSendPolicyComponent,
|
||||||
DomainRulesComponent,
|
DomainRulesComponent,
|
||||||
|
DownloadLicenseComponent,
|
||||||
EmergencyAccessAddEditComponent,
|
EmergencyAccessAddEditComponent,
|
||||||
EmergencyAccessAttachmentsComponent,
|
EmergencyAccessAttachmentsComponent,
|
||||||
EmergencyAccessComponent,
|
EmergencyAccessComponent,
|
||||||
@@ -150,17 +216,65 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
|
|||||||
EmergencyAddEditComponent,
|
EmergencyAddEditComponent,
|
||||||
ExportComponent,
|
ExportComponent,
|
||||||
ExposedPasswordsReportComponent,
|
ExposedPasswordsReportComponent,
|
||||||
|
FamiliesForEnterpriseSetupComponent,
|
||||||
FolderAddEditComponent,
|
FolderAddEditComponent,
|
||||||
|
FooterComponent,
|
||||||
|
FrontendLayoutComponent,
|
||||||
HintComponent,
|
HintComponent,
|
||||||
ImportComponent,
|
ImportComponent,
|
||||||
InactiveTwoFactorReportComponent,
|
InactiveTwoFactorReportComponent,
|
||||||
LockComponent,
|
LockComponent,
|
||||||
LoginComponent,
|
LoginComponent,
|
||||||
|
MasterPasswordPolicyComponent,
|
||||||
|
NavbarComponent,
|
||||||
NestedCheckboxComponent,
|
NestedCheckboxComponent,
|
||||||
|
OrganizationSwitcherComponent,
|
||||||
|
OrgAccountComponent,
|
||||||
|
OrgAddEditComponent,
|
||||||
|
OrganizationBillingComponent,
|
||||||
|
OrganizationLayoutComponent,
|
||||||
|
OrganizationPlansComponent,
|
||||||
|
OrganizationSubscriptionComponent,
|
||||||
|
OrgAttachmentsComponent,
|
||||||
|
OrgBulkConfirmComponent,
|
||||||
|
OrgBulkRemoveComponent,
|
||||||
|
OrgBulkStatusComponent,
|
||||||
|
OrgCiphersComponent,
|
||||||
|
OrgCollectionAddEditComponent,
|
||||||
|
OrgCollectionsComponent,
|
||||||
|
OrgEntityEventsComponent,
|
||||||
|
OrgEntityUsersComponent,
|
||||||
|
OrgEventsComponent,
|
||||||
|
OrgExportComponent,
|
||||||
|
OrgExposedPasswordsReportComponent,
|
||||||
|
OrgGroupAddEditComponent,
|
||||||
|
OrgGroupsComponent,
|
||||||
|
OrgImportComponent,
|
||||||
|
OrgInactiveTwoFactorReportComponent,
|
||||||
|
OrgManageCollectionsComponent,
|
||||||
|
OrgManageComponent,
|
||||||
|
OrgPeopleComponent,
|
||||||
|
OrgPoliciesComponent,
|
||||||
|
OrgPolicyEditComponent,
|
||||||
|
OrgResetPasswordComponent,
|
||||||
|
OrgReusedPasswordsReportComponent,
|
||||||
|
OrgSettingComponent,
|
||||||
|
OrgToolsComponent,
|
||||||
|
OrgTwoFactorSetupComponent,
|
||||||
|
OrgSubscriptionHiddenComponent,
|
||||||
|
OrgUnsecuredWebsitesReportComponent,
|
||||||
|
OrgUserAddEditComponent,
|
||||||
|
OrgUserConfirmComponent,
|
||||||
|
OrgUserGroupsComponent,
|
||||||
|
OrgWeakPasswordsReportComponent,
|
||||||
GeneratorComponent,
|
GeneratorComponent,
|
||||||
PasswordGeneratorHistoryComponent,
|
PasswordGeneratorHistoryComponent,
|
||||||
|
PasswordGeneratorPolicyComponent,
|
||||||
PasswordRepromptComponent,
|
PasswordRepromptComponent,
|
||||||
|
PasswordStrengthComponent,
|
||||||
|
PaymentComponent,
|
||||||
PaymentMethodComponent,
|
PaymentMethodComponent,
|
||||||
|
PersonalOwnershipPolicyComponent,
|
||||||
PreferencesComponent,
|
PreferencesComponent,
|
||||||
PremiumBadgeComponent,
|
PremiumBadgeComponent,
|
||||||
PremiumComponent,
|
PremiumComponent,
|
||||||
@@ -174,21 +288,26 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
|
|||||||
ReportCardComponent,
|
ReportCardComponent,
|
||||||
ReportListComponent,
|
ReportListComponent,
|
||||||
ReportsComponent,
|
ReportsComponent,
|
||||||
|
RequireSsoPolicyComponent,
|
||||||
|
ResetPasswordPolicyComponent,
|
||||||
ReusedPasswordsReportComponent,
|
ReusedPasswordsReportComponent,
|
||||||
SecurityComponent,
|
SecurityComponent,
|
||||||
SecurityKeysComponent,
|
SecurityKeysComponent,
|
||||||
SendAddEditComponent,
|
SendAddEditComponent,
|
||||||
SendComponent,
|
SendComponent,
|
||||||
SendEffluxDatesComponent,
|
SendEffluxDatesComponent,
|
||||||
|
SendOptionsPolicyComponent,
|
||||||
SetPasswordComponent,
|
SetPasswordComponent,
|
||||||
SettingsComponent,
|
SettingsComponent,
|
||||||
ShareComponent,
|
ShareComponent,
|
||||||
|
SingleOrgPolicyComponent,
|
||||||
SponsoredFamiliesComponent,
|
SponsoredFamiliesComponent,
|
||||||
SponsoringOrgRowComponent,
|
SponsoringOrgRowComponent,
|
||||||
SsoComponent,
|
SsoComponent,
|
||||||
SubscriptionComponent,
|
SubscriptionComponent,
|
||||||
TaxInfoComponent,
|
TaxInfoComponent,
|
||||||
ToolsComponent,
|
ToolsComponent,
|
||||||
|
TwoFactorAuthenticationPolicyComponent,
|
||||||
TwoFactorAuthenticatorComponent,
|
TwoFactorAuthenticatorComponent,
|
||||||
TwoFactorComponent,
|
TwoFactorComponent,
|
||||||
TwoFactorDuoComponent,
|
TwoFactorDuoComponent,
|
||||||
@@ -226,6 +345,7 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
|
|||||||
AddEditCustomFieldsComponent,
|
AddEditCustomFieldsComponent,
|
||||||
AdjustPaymentComponent,
|
AdjustPaymentComponent,
|
||||||
AdjustStorageComponent,
|
AdjustStorageComponent,
|
||||||
|
AdjustSubscription,
|
||||||
ApiKeyComponent,
|
ApiKeyComponent,
|
||||||
AttachmentsComponent,
|
AttachmentsComponent,
|
||||||
BreachReportComponent,
|
BreachReportComponent,
|
||||||
@@ -237,12 +357,16 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
|
|||||||
ChangeEmailComponent,
|
ChangeEmailComponent,
|
||||||
ChangeKdfComponent,
|
ChangeKdfComponent,
|
||||||
ChangePasswordComponent,
|
ChangePasswordComponent,
|
||||||
|
ChangePlanComponent,
|
||||||
CiphersComponent,
|
CiphersComponent,
|
||||||
CollectionsComponent,
|
CollectionsComponent,
|
||||||
CreateOrganizationComponent,
|
CreateOrganizationComponent,
|
||||||
DeauthorizeSessionsComponent,
|
DeauthorizeSessionsComponent,
|
||||||
DeleteAccountComponent,
|
DeleteAccountComponent,
|
||||||
|
DeleteOrganizationComponent,
|
||||||
|
DisableSendPolicyComponent,
|
||||||
DomainRulesComponent,
|
DomainRulesComponent,
|
||||||
|
DownloadLicenseComponent,
|
||||||
EmergencyAccessAddEditComponent,
|
EmergencyAccessAddEditComponent,
|
||||||
EmergencyAccessAttachmentsComponent,
|
EmergencyAccessAttachmentsComponent,
|
||||||
EmergencyAccessComponent,
|
EmergencyAccessComponent,
|
||||||
@@ -252,17 +376,64 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
|
|||||||
EmergencyAddEditComponent,
|
EmergencyAddEditComponent,
|
||||||
ExportComponent,
|
ExportComponent,
|
||||||
ExposedPasswordsReportComponent,
|
ExposedPasswordsReportComponent,
|
||||||
|
FamiliesForEnterpriseSetupComponent,
|
||||||
FolderAddEditComponent,
|
FolderAddEditComponent,
|
||||||
|
FooterComponent,
|
||||||
|
FrontendLayoutComponent,
|
||||||
HintComponent,
|
HintComponent,
|
||||||
ImportComponent,
|
ImportComponent,
|
||||||
InactiveTwoFactorReportComponent,
|
InactiveTwoFactorReportComponent,
|
||||||
LockComponent,
|
LockComponent,
|
||||||
LoginComponent,
|
LoginComponent,
|
||||||
|
MasterPasswordPolicyComponent,
|
||||||
|
NavbarComponent,
|
||||||
NestedCheckboxComponent,
|
NestedCheckboxComponent,
|
||||||
|
OrganizationSwitcherComponent,
|
||||||
|
OrgAccountComponent,
|
||||||
|
OrgAddEditComponent,
|
||||||
|
OrganizationBillingComponent,
|
||||||
|
OrganizationLayoutComponent,
|
||||||
|
OrganizationPlansComponent,
|
||||||
|
OrganizationSubscriptionComponent,
|
||||||
|
OrgAttachmentsComponent,
|
||||||
|
OrgBulkConfirmComponent,
|
||||||
|
OrgBulkRemoveComponent,
|
||||||
|
OrgBulkStatusComponent,
|
||||||
|
OrgCiphersComponent,
|
||||||
|
OrgCollectionAddEditComponent,
|
||||||
|
OrgCollectionsComponent,
|
||||||
|
OrgEntityEventsComponent,
|
||||||
|
OrgEntityUsersComponent,
|
||||||
|
OrgEventsComponent,
|
||||||
|
OrgExportComponent,
|
||||||
|
OrgExposedPasswordsReportComponent,
|
||||||
|
OrgGroupAddEditComponent,
|
||||||
|
OrgGroupsComponent,
|
||||||
|
OrgImportComponent,
|
||||||
|
OrgInactiveTwoFactorReportComponent,
|
||||||
|
OrgManageCollectionsComponent,
|
||||||
|
OrgManageComponent,
|
||||||
|
OrgPeopleComponent,
|
||||||
|
OrgPoliciesComponent,
|
||||||
|
OrgPolicyEditComponent,
|
||||||
|
OrgResetPasswordComponent,
|
||||||
|
OrgReusedPasswordsReportComponent,
|
||||||
|
OrgSettingComponent,
|
||||||
|
OrgToolsComponent,
|
||||||
|
OrgTwoFactorSetupComponent,
|
||||||
|
OrgUnsecuredWebsitesReportComponent,
|
||||||
|
OrgUserAddEditComponent,
|
||||||
|
OrgUserConfirmComponent,
|
||||||
|
OrgUserGroupsComponent,
|
||||||
|
OrgWeakPasswordsReportComponent,
|
||||||
GeneratorComponent,
|
GeneratorComponent,
|
||||||
PasswordGeneratorHistoryComponent,
|
PasswordGeneratorHistoryComponent,
|
||||||
|
PasswordGeneratorPolicyComponent,
|
||||||
PasswordRepromptComponent,
|
PasswordRepromptComponent,
|
||||||
|
PasswordStrengthComponent,
|
||||||
|
PaymentComponent,
|
||||||
PaymentMethodComponent,
|
PaymentMethodComponent,
|
||||||
|
PersonalOwnershipPolicyComponent,
|
||||||
PreferencesComponent,
|
PreferencesComponent,
|
||||||
PremiumBadgeComponent,
|
PremiumBadgeComponent,
|
||||||
PremiumComponent,
|
PremiumComponent,
|
||||||
@@ -276,21 +447,26 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
|
|||||||
ReportCardComponent,
|
ReportCardComponent,
|
||||||
ReportListComponent,
|
ReportListComponent,
|
||||||
ReportsComponent,
|
ReportsComponent,
|
||||||
|
RequireSsoPolicyComponent,
|
||||||
|
ResetPasswordPolicyComponent,
|
||||||
ReusedPasswordsReportComponent,
|
ReusedPasswordsReportComponent,
|
||||||
SecurityComponent,
|
SecurityComponent,
|
||||||
SecurityKeysComponent,
|
SecurityKeysComponent,
|
||||||
SendAddEditComponent,
|
SendAddEditComponent,
|
||||||
SendComponent,
|
SendComponent,
|
||||||
SendEffluxDatesComponent,
|
SendEffluxDatesComponent,
|
||||||
|
SendOptionsPolicyComponent,
|
||||||
SetPasswordComponent,
|
SetPasswordComponent,
|
||||||
SettingsComponent,
|
SettingsComponent,
|
||||||
ShareComponent,
|
ShareComponent,
|
||||||
|
SingleOrgPolicyComponent,
|
||||||
SponsoredFamiliesComponent,
|
SponsoredFamiliesComponent,
|
||||||
SponsoringOrgRowComponent,
|
SponsoringOrgRowComponent,
|
||||||
SsoComponent,
|
SsoComponent,
|
||||||
SubscriptionComponent,
|
SubscriptionComponent,
|
||||||
TaxInfoComponent,
|
TaxInfoComponent,
|
||||||
ToolsComponent,
|
ToolsComponent,
|
||||||
|
TwoFactorAuthenticationPolicyComponent,
|
||||||
TwoFactorAuthenticatorComponent,
|
TwoFactorAuthenticatorComponent,
|
||||||
TwoFactorComponent,
|
TwoFactorComponent,
|
||||||
TwoFactorDuoComponent,
|
TwoFactorDuoComponent,
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
import { ScrollingModule } from "@angular/cdk/scrolling";
|
|
||||||
import { NgModule } from "@angular/core";
|
|
||||||
|
|
||||||
import { SharedModule } from "../../shared.module";
|
|
||||||
|
|
||||||
import { EntityUsersComponent } from "./entity-users.component";
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [SharedModule, ScrollingModule],
|
|
||||||
declarations: [EntityUsersComponent],
|
|
||||||
exports: [EntityUsersComponent],
|
|
||||||
})
|
|
||||||
export class OrganizationManageModule {}
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
<div
|
|
||||||
class="modal fade"
|
|
||||||
role="dialog"
|
|
||||||
aria-modal="true"
|
|
||||||
aria-labelledby="enrollMasterPasswordResetTitle"
|
|
||||||
>
|
|
||||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
|
||||||
<form
|
|
||||||
class="modal-content"
|
|
||||||
#form
|
|
||||||
(ngSubmit)="submit()"
|
|
||||||
[appApiAction]="formPromise"
|
|
||||||
ngNativeValidate
|
|
||||||
>
|
|
||||||
<div class="modal-header">
|
|
||||||
<h2 class="modal-title" id="enrollMasterPasswordResetTitle">
|
|
||||||
{{ (isEnrolled ? "withdrawPasswordReset" : "enrollPasswordReset") | i18n }}
|
|
||||||
</h2>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="close"
|
|
||||||
data-dismiss="modal"
|
|
||||||
appA11yTitle="{{ 'close' | i18n }}"
|
|
||||||
>
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<app-callout type="warning" *ngIf="!isEnrolled">
|
|
||||||
{{ "resetPasswordEnrollmentWarning" | i18n }}
|
|
||||||
</app-callout>
|
|
||||||
<app-user-verification [(ngModel)]="verification" name="secret"> </app-user-verification>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button bit-button buttonType="primary" type="submit" [disabled]="form.loading">
|
|
||||||
<i
|
|
||||||
class="bwi bwi-spinner bwi-spin"
|
|
||||||
title="{{ 'loading' | i18n }}"
|
|
||||||
*ngIf="form.loading"
|
|
||||||
></i>
|
|
||||||
<span>
|
|
||||||
{{ "submit" | i18n }}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
bit-button
|
|
||||||
buttonType="secondary"
|
|
||||||
type="button"
|
|
||||||
data-dismiss="modal"
|
|
||||||
appA11yTitle="{{ 'close' | i18n }}"
|
|
||||||
>
|
|
||||||
<span>
|
|
||||||
{{ "cancel" | i18n }}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
import { Component } from "@angular/core";
|
|
||||||
|
|
||||||
import { ModalRef } from "jslib-angular/components/modal/modal.ref";
|
|
||||||
import { ModalConfig } from "jslib-angular/services/modal.service";
|
|
||||||
import { ApiService } from "jslib-common/abstractions/api.service";
|
|
||||||
import { CryptoService } from "jslib-common/abstractions/crypto.service";
|
|
||||||
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
|
||||||
import { LogService } from "jslib-common/abstractions/log.service";
|
|
||||||
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
|
|
||||||
import { SyncService } from "jslib-common/abstractions/sync.service";
|
|
||||||
import { UserVerificationService } from "jslib-common/abstractions/userVerification.service";
|
|
||||||
import { Utils } from "jslib-common/misc/utils";
|
|
||||||
import { Organization } from "jslib-common/models/domain/organization";
|
|
||||||
import { OrganizationUserResetPasswordEnrollmentRequest } from "jslib-common/models/request/organizationUserResetPasswordEnrollmentRequest";
|
|
||||||
import { Verification } from "jslib-common/types/verification";
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: "app-enroll-master-password-reset",
|
|
||||||
templateUrl: "enroll-master-password-reset.component.html",
|
|
||||||
})
|
|
||||||
export class EnrollMasterPasswordReset {
|
|
||||||
organization: Organization;
|
|
||||||
|
|
||||||
verification: Verification;
|
|
||||||
formPromise: Promise<any>;
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private userVerificationService: UserVerificationService,
|
|
||||||
private apiService: ApiService,
|
|
||||||
private platformUtilsService: PlatformUtilsService,
|
|
||||||
private i18nService: I18nService,
|
|
||||||
private cryptoService: CryptoService,
|
|
||||||
private syncService: SyncService,
|
|
||||||
private logService: LogService,
|
|
||||||
private modalRef: ModalRef,
|
|
||||||
config: ModalConfig
|
|
||||||
) {
|
|
||||||
this.organization = config.data.organization;
|
|
||||||
}
|
|
||||||
|
|
||||||
async submit() {
|
|
||||||
let toastStringRef = "withdrawPasswordResetSuccess";
|
|
||||||
|
|
||||||
this.formPromise = this.userVerificationService
|
|
||||||
.buildRequest(this.verification, OrganizationUserResetPasswordEnrollmentRequest)
|
|
||||||
.then(async (request) => {
|
|
||||||
// Set variables
|
|
||||||
let keyString: string = null;
|
|
||||||
|
|
||||||
// Enrolling
|
|
||||||
if (!this.organization.resetPasswordEnrolled) {
|
|
||||||
// Retrieve Public Key
|
|
||||||
const orgKeys = await this.apiService.getOrganizationKeys(this.organization.id);
|
|
||||||
if (orgKeys == null) {
|
|
||||||
throw new Error(this.i18nService.t("resetPasswordOrgKeysError"));
|
|
||||||
}
|
|
||||||
|
|
||||||
const publicKey = Utils.fromB64ToArray(orgKeys.publicKey);
|
|
||||||
|
|
||||||
// RSA Encrypt user's encKey.key with organization public key
|
|
||||||
const encKey = await this.cryptoService.getEncKey();
|
|
||||||
const encryptedKey = await this.cryptoService.rsaEncrypt(encKey.key, publicKey.buffer);
|
|
||||||
keyString = encryptedKey.encryptedString;
|
|
||||||
toastStringRef = "enrollPasswordResetSuccess";
|
|
||||||
|
|
||||||
// Create request and execute enrollment
|
|
||||||
request.resetPasswordKey = keyString;
|
|
||||||
await this.apiService.putOrganizationUserResetPasswordEnrollment(
|
|
||||||
this.organization.id,
|
|
||||||
this.organization.userId,
|
|
||||||
request
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
// Withdrawal
|
|
||||||
request.resetPasswordKey = keyString;
|
|
||||||
await this.apiService.putOrganizationUserResetPasswordEnrollment(
|
|
||||||
this.organization.id,
|
|
||||||
this.organization.userId,
|
|
||||||
request
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
await this.syncService.fullSync(true);
|
|
||||||
});
|
|
||||||
try {
|
|
||||||
await this.formPromise;
|
|
||||||
this.platformUtilsService.showToast("success", null, this.i18nService.t(toastStringRef));
|
|
||||||
this.modalRef.close();
|
|
||||||
} catch (e) {
|
|
||||||
this.logService.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
get isEnrolled(): boolean {
|
|
||||||
return this.organization.resetPasswordEnrolled;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
import { ScrollingModule } from "@angular/cdk/scrolling";
|
|
||||||
import { NgModule } from "@angular/core";
|
|
||||||
|
|
||||||
import { LooseComponentsModule } from "../../loose-components.module";
|
|
||||||
import { SharedModule } from "../../shared.module";
|
|
||||||
|
|
||||||
import { EnrollMasterPasswordReset } from "./enroll-master-password-reset.component";
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [SharedModule, ScrollingModule, LooseComponentsModule],
|
|
||||||
declarations: [EnrollMasterPasswordReset],
|
|
||||||
exports: [EnrollMasterPasswordReset],
|
|
||||||
})
|
|
||||||
export class OrganizationUserModule {}
|
|
||||||
@@ -59,10 +59,6 @@ import { ToastrModule } from "ngx-toastr";
|
|||||||
|
|
||||||
import { JslibModule } from "jslib-angular/jslib.module";
|
import { JslibModule } from "jslib-angular/jslib.module";
|
||||||
|
|
||||||
import { PasswordStrengthComponent } from "../components/password-strength.component";
|
|
||||||
import { OrganizationPlansComponent } from "../settings/organization-plans.component";
|
|
||||||
import { PaymentComponent } from "../settings/payment.component";
|
|
||||||
|
|
||||||
registerLocaleData(localeAf, "af");
|
registerLocaleData(localeAf, "af");
|
||||||
registerLocaleData(localeAz, "az");
|
registerLocaleData(localeAz, "az");
|
||||||
registerLocaleData(localeBe, "be");
|
registerLocaleData(localeBe, "be");
|
||||||
@@ -131,7 +127,6 @@ registerLocaleData(localeZhTw, "zh-TW");
|
|||||||
ButtonModule,
|
ButtonModule,
|
||||||
MenuModule,
|
MenuModule,
|
||||||
],
|
],
|
||||||
declarations: [PasswordStrengthComponent, OrganizationPlansComponent, PaymentComponent],
|
|
||||||
exports: [
|
exports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
DragDropModule,
|
DragDropModule,
|
||||||
@@ -147,9 +142,6 @@ registerLocaleData(localeZhTw, "zh-TW");
|
|||||||
BadgeModule,
|
BadgeModule,
|
||||||
ButtonModule,
|
ButtonModule,
|
||||||
MenuModule,
|
MenuModule,
|
||||||
PasswordStrengthComponent,
|
|
||||||
OrganizationPlansComponent,
|
|
||||||
PaymentComponent,
|
|
||||||
],
|
],
|
||||||
providers: [DatePipe],
|
providers: [DatePipe],
|
||||||
bootstrap: [],
|
bootstrap: [],
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import { Component, Input } from "@angular/core";
|
import { Component, Input } from "@angular/core";
|
||||||
|
|
||||||
import { ModalService } from "jslib-angular/services/modal.service";
|
|
||||||
import { ApiService } from "jslib-common/abstractions/api.service";
|
import { ApiService } from "jslib-common/abstractions/api.service";
|
||||||
|
import { CryptoService } from "jslib-common/abstractions/crypto.service";
|
||||||
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
||||||
import { LogService } from "jslib-common/abstractions/log.service";
|
import { LogService } from "jslib-common/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
|
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
|
||||||
import { PolicyService } from "jslib-common/abstractions/policy.service";
|
import { PolicyService } from "jslib-common/abstractions/policy.service";
|
||||||
import { SyncService } from "jslib-common/abstractions/sync.service";
|
import { SyncService } from "jslib-common/abstractions/sync.service";
|
||||||
import { PolicyType } from "jslib-common/enums/policyType";
|
import { PolicyType } from "jslib-common/enums/policyType";
|
||||||
|
import { Utils } from "jslib-common/misc/utils";
|
||||||
import { Organization } from "jslib-common/models/domain/organization";
|
import { Organization } from "jslib-common/models/domain/organization";
|
||||||
import { Policy } from "jslib-common/models/domain/policy";
|
import { Policy } from "jslib-common/models/domain/policy";
|
||||||
|
import { OrganizationUserResetPasswordEnrollmentRequest } from "jslib-common/models/request/organizationUserResetPasswordEnrollmentRequest";
|
||||||
import { EnrollMasterPasswordReset } from "../../organizations/users/enroll-master-password-reset.component";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-organization-options",
|
selector: "app-organization-options",
|
||||||
@@ -29,8 +29,8 @@ export class OrganizationOptionsComponent {
|
|||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
private syncService: SyncService,
|
private syncService: SyncService,
|
||||||
|
private cryptoService: CryptoService,
|
||||||
private policyService: PolicyService,
|
private policyService: PolicyService,
|
||||||
private modalService: ModalService,
|
|
||||||
private logService: LogService
|
private logService: LogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
@@ -113,11 +113,70 @@ export class OrganizationOptionsComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async toggleResetPasswordEnrollment(org: Organization) {
|
async toggleResetPasswordEnrollment(org: Organization) {
|
||||||
this.modalService.open(EnrollMasterPasswordReset, {
|
// Set variables
|
||||||
allowMultipleModals: true,
|
let keyString: string = null;
|
||||||
data: {
|
let toastStringRef = "withdrawPasswordResetSuccess";
|
||||||
organization: org,
|
|
||||||
},
|
// Enrolling
|
||||||
});
|
if (!org.resetPasswordEnrolled) {
|
||||||
|
// Alert user about enrollment
|
||||||
|
const confirmed = await this.platformUtilsService.showDialog(
|
||||||
|
this.i18nService.t("resetPasswordEnrollmentWarning"),
|
||||||
|
null,
|
||||||
|
this.i18nService.t("yes"),
|
||||||
|
this.i18nService.t("no"),
|
||||||
|
"warning"
|
||||||
|
);
|
||||||
|
if (!confirmed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve Public Key
|
||||||
|
this.actionPromise = this.apiService
|
||||||
|
.getOrganizationKeys(org.id)
|
||||||
|
.then(async (response) => {
|
||||||
|
if (response == null) {
|
||||||
|
throw new Error(this.i18nService.t("resetPasswordOrgKeysError"));
|
||||||
|
}
|
||||||
|
|
||||||
|
const publicKey = Utils.fromB64ToArray(response.publicKey);
|
||||||
|
|
||||||
|
// RSA Encrypt user's encKey.key with organization public key
|
||||||
|
const encKey = await this.cryptoService.getEncKey();
|
||||||
|
const encryptedKey = await this.cryptoService.rsaEncrypt(encKey.key, publicKey.buffer);
|
||||||
|
keyString = encryptedKey.encryptedString;
|
||||||
|
toastStringRef = "enrollPasswordResetSuccess";
|
||||||
|
|
||||||
|
// Create request and execute enrollment
|
||||||
|
const request = new OrganizationUserResetPasswordEnrollmentRequest();
|
||||||
|
request.resetPasswordKey = keyString;
|
||||||
|
return this.apiService.putOrganizationUserResetPasswordEnrollment(
|
||||||
|
org.id,
|
||||||
|
org.userId,
|
||||||
|
request
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return this.syncService.fullSync(true);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// Withdrawal
|
||||||
|
const request = new OrganizationUserResetPasswordEnrollmentRequest();
|
||||||
|
request.resetPasswordKey = keyString;
|
||||||
|
this.actionPromise = this.apiService
|
||||||
|
.putOrganizationUserResetPasswordEnrollment(org.id, org.userId, request)
|
||||||
|
.then(() => {
|
||||||
|
return this.syncService.fullSync(true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await this.actionPromise;
|
||||||
|
this.platformUtilsService.showToast("success", null, this.i18nService.t(toastStringRef));
|
||||||
|
await this.load();
|
||||||
|
} catch (e) {
|
||||||
|
this.platformUtilsService.showToast("error", this.i18nService.t("errorOccurred"), e.message);
|
||||||
|
this.logService.error(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import { Component, Input } from "@angular/core";
|
||||||
|
|
||||||
|
import { Organization } from "jslib-common/models/domain/organization";
|
||||||
|
|
||||||
|
import { VaultFilterComponent } from "./vault-filter.component";
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: "app-organization-vault-filter",
|
||||||
|
templateUrl: "vault-filter.component.html",
|
||||||
|
})
|
||||||
|
export class OrganizationVaultFilterComponent extends VaultFilterComponent {
|
||||||
|
hideOrganizations = true;
|
||||||
|
hideFavorites = true;
|
||||||
|
hideFolders = true;
|
||||||
|
|
||||||
|
organization: Organization;
|
||||||
|
|
||||||
|
async initCollections() {
|
||||||
|
if (this.organization.canEditAnyCollection) {
|
||||||
|
return await this.vaultFilterService.buildAdminCollections(this.organization.id);
|
||||||
|
}
|
||||||
|
return await this.vaultFilterService.buildCollections(this.organization.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
async reloadCollectionsAndFolders() {
|
||||||
|
this.collections = await this.initCollections();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -27,7 +27,6 @@
|
|||||||
appAutofocus
|
appAutofocus
|
||||||
/>
|
/>
|
||||||
<app-organization-filter
|
<app-organization-filter
|
||||||
*ngIf="showOrgFilter"
|
|
||||||
[hide]="hideOrganizations"
|
[hide]="hideOrganizations"
|
||||||
[activeFilter]="activeFilter"
|
[activeFilter]="activeFilter"
|
||||||
[collapsedFilterNodes]="collapsedFilterNodes"
|
[collapsedFilterNodes]="collapsedFilterNodes"
|
||||||
@@ -39,7 +38,7 @@
|
|||||||
></app-organization-filter>
|
></app-organization-filter>
|
||||||
<div class="filter">
|
<div class="filter">
|
||||||
<app-status-filter
|
<app-status-filter
|
||||||
[hideFavorites]="!showFavorites"
|
[hideFavorites]="hideFavorites"
|
||||||
[hideTrash]="hideTrash"
|
[hideTrash]="hideTrash"
|
||||||
[activeFilter]="activeFilter"
|
[activeFilter]="activeFilter"
|
||||||
(onFilterChange)="applyFilter($event)"
|
(onFilterChange)="applyFilter($event)"
|
||||||
@@ -55,7 +54,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="filter">
|
<div class="filter">
|
||||||
<app-folder-filter
|
<app-folder-filter
|
||||||
[hide]="!showFolders"
|
[hide]="hideFolders"
|
||||||
[activeFilter]="activeFilter"
|
[activeFilter]="activeFilter"
|
||||||
[collapsedFilterNodes]="collapsedFilterNodes"
|
[collapsedFilterNodes]="collapsedFilterNodes"
|
||||||
[folderNodes]="folders"
|
[folderNodes]="folders"
|
||||||
|
|||||||
@@ -1,26 +1,22 @@
|
|||||||
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
import { Component, EventEmitter, Output } from "@angular/core";
|
||||||
|
|
||||||
import { VaultFilterComponent as BaseVaultFilterComponent } from "jslib-angular/modules/vault-filter/vault-filter.component";
|
import { VaultFilterComponent as BaseVaultFilterComponent } from "jslib-angular/modules/vault-filter/vault-filter.component";
|
||||||
import { VaultFilterService } from "jslib-angular/modules/vault-filter/vault-filter.service";
|
|
||||||
import { Organization } from "jslib-common/models/domain/organization";
|
import { VaultFilterService } from "./vault-filter.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-vault-filter",
|
selector: "app-vault-filter",
|
||||||
templateUrl: "vault-filter.component.html",
|
templateUrl: "vault-filter.component.html",
|
||||||
})
|
})
|
||||||
export class VaultFilterComponent extends BaseVaultFilterComponent {
|
export class VaultFilterComponent extends BaseVaultFilterComponent {
|
||||||
@Input() showOrgFilter = true;
|
|
||||||
@Input() showFolders = true;
|
|
||||||
@Input() showFavorites = true;
|
|
||||||
|
|
||||||
@Output() onSearchTextChanged = new EventEmitter<string>();
|
@Output() onSearchTextChanged = new EventEmitter<string>();
|
||||||
|
|
||||||
searchPlaceholder: string;
|
searchPlaceholder: string;
|
||||||
searchText = "";
|
searchText = "";
|
||||||
|
|
||||||
organization: Organization;
|
constructor(protected vaultFilterService: VaultFilterService) {
|
||||||
|
// This empty constructor is required to provide the web vaultFilterService subclass to super()
|
||||||
constructor(vaultFilterService: VaultFilterService) {
|
// TODO: refactor this to use proper dependency injection
|
||||||
super(vaultFilterService);
|
super(vaultFilterService);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,7 +24,13 @@ export class VaultFilterComponent extends BaseVaultFilterComponent {
|
|||||||
this.onSearchTextChanged.emit(this.searchText);
|
this.onSearchTextChanged.emit(this.searchText);
|
||||||
}
|
}
|
||||||
|
|
||||||
async initCollections() {
|
// This method exists because the vault component gets its data mixed up during the initial sync on first login. It looks for data before the sync is complete.
|
||||||
return await this.vaultFilterService.buildCollections(this.organization?.id);
|
// It should be removed as soon as doing so makes sense.
|
||||||
|
async reloadOrganizations() {
|
||||||
|
this.organizations = await this.vaultFilterService.buildOrganizations();
|
||||||
|
this.activePersonalOwnershipPolicy =
|
||||||
|
await this.vaultFilterService.checkForPersonalOwnershipPolicy();
|
||||||
|
this.activeSingleOrganizationPolicy =
|
||||||
|
await this.vaultFilterService.checkForSingleOrganizationPolicy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
import { NgModule } from "@angular/core";
|
import { NgModule } from "@angular/core";
|
||||||
|
|
||||||
import { VaultFilterService } from "jslib-angular/modules/vault-filter/vault-filter.service";
|
|
||||||
import { CipherService } from "jslib-common/abstractions/cipher.service";
|
|
||||||
import { CollectionService } from "jslib-common/abstractions/collection.service";
|
|
||||||
import { FolderService } from "jslib-common/abstractions/folder.service";
|
|
||||||
import { OrganizationService } from "jslib-common/abstractions/organization.service";
|
|
||||||
import { PolicyService } from "jslib-common/abstractions/policy.service";
|
|
||||||
import { StateService } from "jslib-common/abstractions/state.service";
|
|
||||||
|
|
||||||
import { SharedModule } from "../shared.module";
|
import { SharedModule } from "../shared.module";
|
||||||
|
|
||||||
import { CollectionFilterComponent } from "./components/collection-filter.component";
|
import { CollectionFilterComponent } from "./components/collection-filter.component";
|
||||||
@@ -17,7 +9,9 @@ import { OrganizationFilterComponent } from "./components/organization-filter.co
|
|||||||
import { OrganizationOptionsComponent } from "./components/organization-options.component";
|
import { OrganizationOptionsComponent } from "./components/organization-options.component";
|
||||||
import { StatusFilterComponent } from "./components/status-filter.component";
|
import { StatusFilterComponent } from "./components/status-filter.component";
|
||||||
import { TypeFilterComponent } from "./components/type-filter.component";
|
import { TypeFilterComponent } from "./components/type-filter.component";
|
||||||
|
import { OrganizationVaultFilterComponent } from "./organization-vault-filter.component";
|
||||||
import { VaultFilterComponent } from "./vault-filter.component";
|
import { VaultFilterComponent } from "./vault-filter.component";
|
||||||
|
import { VaultFilterService } from "./vault-filter.service";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [SharedModule],
|
imports: [SharedModule],
|
||||||
@@ -29,22 +23,10 @@ import { VaultFilterComponent } from "./vault-filter.component";
|
|||||||
OrganizationOptionsComponent,
|
OrganizationOptionsComponent,
|
||||||
StatusFilterComponent,
|
StatusFilterComponent,
|
||||||
TypeFilterComponent,
|
TypeFilterComponent,
|
||||||
|
OrganizationVaultFilterComponent,
|
||||||
LinkSsoComponent,
|
LinkSsoComponent,
|
||||||
],
|
],
|
||||||
exports: [VaultFilterComponent],
|
exports: [VaultFilterComponent, OrganizationVaultFilterComponent],
|
||||||
providers: [
|
providers: [VaultFilterService],
|
||||||
{
|
|
||||||
provide: VaultFilterService,
|
|
||||||
useClass: VaultFilterService,
|
|
||||||
deps: [
|
|
||||||
StateService,
|
|
||||||
OrganizationService,
|
|
||||||
FolderService,
|
|
||||||
CipherService,
|
|
||||||
CollectionService,
|
|
||||||
PolicyService,
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class VaultFilterModule {}
|
export class VaultFilterModule {}
|
||||||
|
|||||||
@@ -1,3 +1,54 @@
|
|||||||
import { VaultFilterService as BaseVaultFilterService } from "jslib-angular/modules/vault-filter/vault-filter.service";
|
import { Injectable } from "@angular/core";
|
||||||
|
|
||||||
export class VaultFilterService extends BaseVaultFilterService {}
|
import { DynamicTreeNode } from "jslib-angular/modules/vault-filter/models/dynamic-tree-node.model";
|
||||||
|
import { VaultFilterService as BaseVaultFilterService } from "jslib-angular/modules/vault-filter/vault-filter.service";
|
||||||
|
import { ApiService } from "jslib-common/abstractions/api.service";
|
||||||
|
import { CipherService } from "jslib-common/abstractions/cipher.service";
|
||||||
|
import { CollectionService } from "jslib-common/abstractions/collection.service";
|
||||||
|
import { FolderService } from "jslib-common/abstractions/folder.service";
|
||||||
|
import { OrganizationService } from "jslib-common/abstractions/organization.service";
|
||||||
|
import { PolicyService } from "jslib-common/abstractions/policy.service";
|
||||||
|
import { StateService } from "jslib-common/abstractions/state.service";
|
||||||
|
import { CollectionData } from "jslib-common/models/data/collectionData";
|
||||||
|
import { Collection } from "jslib-common/models/domain/collection";
|
||||||
|
import { CollectionDetailsResponse } from "jslib-common/models/response/collectionResponse";
|
||||||
|
import { CollectionView } from "jslib-common/models/view/collectionView";
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class VaultFilterService extends BaseVaultFilterService {
|
||||||
|
constructor(
|
||||||
|
stateService: StateService,
|
||||||
|
organizationService: OrganizationService,
|
||||||
|
folderService: FolderService,
|
||||||
|
cipherService: CipherService,
|
||||||
|
collectionService: CollectionService,
|
||||||
|
policyService: PolicyService,
|
||||||
|
protected apiService: ApiService
|
||||||
|
) {
|
||||||
|
super(
|
||||||
|
stateService,
|
||||||
|
organizationService,
|
||||||
|
folderService,
|
||||||
|
cipherService,
|
||||||
|
collectionService,
|
||||||
|
policyService
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
async buildAdminCollections(organizationId: string) {
|
||||||
|
let result: CollectionView[] = [];
|
||||||
|
const collectionResponse = await this.apiService.getCollections(organizationId);
|
||||||
|
if (collectionResponse?.data != null && collectionResponse.data.length) {
|
||||||
|
const collectionDomains = collectionResponse.data.map(
|
||||||
|
(r: CollectionDetailsResponse) => new Collection(new CollectionData(r))
|
||||||
|
);
|
||||||
|
result = await this.collectionService.decryptMany(collectionDomains);
|
||||||
|
}
|
||||||
|
|
||||||
|
const nestedCollections = await this.collectionService.getAllNested(result);
|
||||||
|
return new DynamicTreeNode<CollectionView>({
|
||||||
|
fullList: result,
|
||||||
|
nestedList: nestedCollections,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ export class IndividualVaultComponent implements OnInit, OnDestroy {
|
|||||||
updateKeyModalRef: ViewContainerRef;
|
updateKeyModalRef: ViewContainerRef;
|
||||||
|
|
||||||
favorites = false;
|
favorites = false;
|
||||||
|
type: CipherType = null;
|
||||||
folderId: string = null;
|
folderId: string = null;
|
||||||
collectionId: string = null;
|
collectionId: string = null;
|
||||||
organizationId: string = null;
|
organizationId: string = null;
|
||||||
@@ -326,7 +327,7 @@ export class IndividualVaultComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
async addCipher() {
|
async addCipher() {
|
||||||
const component = await this.editCipher(null);
|
const component = await this.editCipher(null);
|
||||||
component.type = this.activeFilter.cipherType;
|
component.type = this.type;
|
||||||
component.folderId = this.folderId === "none" ? null : this.folderId;
|
component.folderId = this.folderId === "none" ? null : this.folderId;
|
||||||
if (this.activeFilter.selectedCollectionId != null) {
|
if (this.activeFilter.selectedCollectionId != null) {
|
||||||
const collection = this.filterComponent.collections.fullList.filter(
|
const collection = this.filterComponent.collections.fullList.filter(
|
||||||
@@ -398,7 +399,7 @@ export class IndividualVaultComponent implements OnInit, OnDestroy {
|
|||||||
if (queryParams == null) {
|
if (queryParams == null) {
|
||||||
queryParams = {
|
queryParams = {
|
||||||
favorites: this.favorites ? true : null,
|
favorites: this.favorites ? true : null,
|
||||||
type: this.activeFilter.cipherType,
|
type: this.type,
|
||||||
folderId: this.folderId,
|
folderId: this.folderId,
|
||||||
collectionId: this.collectionId,
|
collectionId: this.collectionId,
|
||||||
deleted: this.deleted ? true : null,
|
deleted: this.deleted ? true : null,
|
||||||
|
|||||||
@@ -4,15 +4,12 @@
|
|||||||
<div class="groupings">
|
<div class="groupings">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="inner-content">
|
<div class="inner-content">
|
||||||
<app-vault-filter
|
<app-organization-vault-filter
|
||||||
#vaultFilter
|
#vaultFilter
|
||||||
[showFolders]="false"
|
|
||||||
[showFavorites]="false"
|
|
||||||
[activeFilter]="activeFilter"
|
[activeFilter]="activeFilter"
|
||||||
[showOrgFilter]="false"
|
|
||||||
(onFilterChange)="applyVaultFilter($event)"
|
(onFilterChange)="applyVaultFilter($event)"
|
||||||
(onSearchTextChanged)="filterSearchText($event)"
|
(onSearchTextChanged)="filterSearchText($event)"
|
||||||
></app-vault-filter>
|
></app-organization-vault-filter>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -25,14 +25,13 @@ import { Organization } from "jslib-common/models/domain/organization";
|
|||||||
import { CipherView } from "jslib-common/models/view/cipherView";
|
import { CipherView } from "jslib-common/models/view/cipherView";
|
||||||
|
|
||||||
import { EntityEventsComponent } from "../../../../organizations/manage/entity-events.component";
|
import { EntityEventsComponent } from "../../../../organizations/manage/entity-events.component";
|
||||||
import { VaultFilterComponent } from "../../../vault-filter/vault-filter.component";
|
import { AddEditComponent } from "../../../../organizations/vault/add-edit.component";
|
||||||
|
import { AttachmentsComponent } from "../../../../organizations/vault/attachments.component";
|
||||||
|
import { CiphersComponent } from "../../../../organizations/vault/ciphers.component";
|
||||||
|
import { CollectionsComponent } from "../../../../organizations/vault/collections.component";
|
||||||
|
import { OrganizationVaultFilterComponent } from "../../../vault-filter/organization-vault-filter.component";
|
||||||
import { VaultService } from "../../vault.service";
|
import { VaultService } from "../../vault.service";
|
||||||
|
|
||||||
import { AddEditComponent } from "./add-edit.component";
|
|
||||||
import { AttachmentsComponent } from "./attachments.component";
|
|
||||||
import { CiphersComponent } from "./ciphers.component";
|
|
||||||
import { CollectionsComponent } from "./collections.component";
|
|
||||||
|
|
||||||
const BroadcasterSubscriptionId = "OrgVaultComponent";
|
const BroadcasterSubscriptionId = "OrgVaultComponent";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -40,7 +39,8 @@ const BroadcasterSubscriptionId = "OrgVaultComponent";
|
|||||||
templateUrl: "organization-vault.component.html",
|
templateUrl: "organization-vault.component.html",
|
||||||
})
|
})
|
||||||
export class OrganizationVaultComponent implements OnInit, OnDestroy {
|
export class OrganizationVaultComponent implements OnInit, OnDestroy {
|
||||||
@ViewChild("vaultFilter", { static: true }) vaultFilterComponent: VaultFilterComponent;
|
@ViewChild("vaultFilter", { static: true })
|
||||||
|
vaultFilterComponent: OrganizationVaultFilterComponent;
|
||||||
@ViewChild(CiphersComponent, { static: true }) ciphersComponent: CiphersComponent;
|
@ViewChild(CiphersComponent, { static: true }) ciphersComponent: CiphersComponent;
|
||||||
@ViewChild("attachments", { read: ViewContainerRef, static: true })
|
@ViewChild("attachments", { read: ViewContainerRef, static: true })
|
||||||
attachmentsModalRef: ViewContainerRef;
|
attachmentsModalRef: ViewContainerRef;
|
||||||
@@ -58,6 +58,11 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
|
|||||||
trashCleanupWarning: string = null;
|
trashCleanupWarning: string = null;
|
||||||
activeFilter: VaultFilter = new VaultFilter();
|
activeFilter: VaultFilter = new VaultFilter();
|
||||||
|
|
||||||
|
// This is a hack to avoid redundant api calls that fetch OrganizationVaultFilterComponent collections
|
||||||
|
// When it makes sense to do so we should leverage some other communication method for change events that isn't directly tied to the query param for organizationId
|
||||||
|
// i.e. exposing the VaultFiltersService to the OrganizationSwitcherComponent to make relevant updates from a change event instead of just depending on the router
|
||||||
|
firstLoaded = true;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private organizationService: OrganizationService,
|
private organizationService: OrganizationService,
|
||||||
@@ -96,11 +101,7 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
|
|||||||
case "syncCompleted":
|
case "syncCompleted":
|
||||||
if (message.successfully) {
|
if (message.successfully) {
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
this.vaultFilterComponent.reloadCollectionsAndFolders(
|
this.vaultFilterComponent.reloadCollectionsAndFolders(),
|
||||||
new VaultFilter({
|
|
||||||
selectedOrganizationId: this.organization.id,
|
|
||||||
} as Partial<VaultFilter>)
|
|
||||||
),
|
|
||||||
this.ciphersComponent.refresh(),
|
this.ciphersComponent.refresh(),
|
||||||
]);
|
]);
|
||||||
this.changeDetectorRef.detectChanges();
|
this.changeDetectorRef.detectChanges();
|
||||||
@@ -110,9 +111,12 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
await this.vaultFilterComponent.reloadCollectionsAndFolders(
|
|
||||||
new VaultFilter({ selectedOrganizationId: this.organization.id } as Partial<VaultFilter>)
|
if (!this.firstLoaded) {
|
||||||
);
|
await this.vaultFilterComponent.reloadCollectionsAndFolders();
|
||||||
|
}
|
||||||
|
this.firstLoaded = false;
|
||||||
|
|
||||||
await this.ciphersComponent.reload();
|
await this.ciphersComponent.reload();
|
||||||
|
|
||||||
if (qParams.viewEvents != null) {
|
if (qParams.viewEvents != null) {
|
||||||
|
|||||||
@@ -2,22 +2,12 @@ import { NgModule } from "@angular/core";
|
|||||||
|
|
||||||
import { VaultModule } from "../../vault.module";
|
import { VaultModule } from "../../vault.module";
|
||||||
|
|
||||||
import { AddEditComponent } from "./add-edit.component";
|
|
||||||
import { AttachmentsComponent } from "./attachments.component";
|
|
||||||
import { CiphersComponent } from "./ciphers.component";
|
|
||||||
import { CollectionsComponent } from "./collections.component";
|
|
||||||
import { OrganizationVaultRoutingModule } from "./organization-vault-routing.module";
|
import { OrganizationVaultRoutingModule } from "./organization-vault-routing.module";
|
||||||
import { OrganizationVaultComponent } from "./organization-vault.component";
|
import { OrganizationVaultComponent } from "./organization-vault.component";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [VaultModule, OrganizationVaultRoutingModule],
|
imports: [VaultModule, OrganizationVaultRoutingModule],
|
||||||
declarations: [
|
declarations: [OrganizationVaultComponent],
|
||||||
OrganizationVaultComponent,
|
|
||||||
AddEditComponent,
|
|
||||||
AttachmentsComponent,
|
|
||||||
CiphersComponent,
|
|
||||||
CollectionsComponent,
|
|
||||||
],
|
|
||||||
exports: [OrganizationVaultComponent],
|
exports: [OrganizationVaultComponent],
|
||||||
})
|
})
|
||||||
export class OrganizationVaultModule {}
|
export class OrganizationVaultModule {}
|
||||||
|
|||||||
@@ -20,9 +20,8 @@ import {
|
|||||||
import { ListResponse } from "jslib-common/models/response/listResponse";
|
import { ListResponse } from "jslib-common/models/response/listResponse";
|
||||||
import { CollectionView } from "jslib-common/models/view/collectionView";
|
import { CollectionView } from "jslib-common/models/view/collectionView";
|
||||||
|
|
||||||
import { EntityUsersComponent } from "../../modules/organizations/manage/entity-users.component";
|
|
||||||
|
|
||||||
import { CollectionAddEditComponent } from "./collection-add-edit.component";
|
import { CollectionAddEditComponent } from "./collection-add-edit.component";
|
||||||
|
import { EntityUsersComponent } from "./entity-users.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-org-manage-collections",
|
selector: "app-org-manage-collections",
|
||||||
|
|||||||
@@ -29,52 +29,52 @@
|
|||||||
></i>
|
></i>
|
||||||
<span class="sr-only">{{ "loading" | i18n }}</span>
|
<span class="sr-only">{{ "loading" | i18n }}</span>
|
||||||
</div>
|
</div>
|
||||||
<cdk-virtual-scroll-viewport
|
<div
|
||||||
itemSize="46"
|
class="modal-body"
|
||||||
minBufferPx="600"
|
*ngIf="
|
||||||
maxBufferPx="1200"
|
!loading && users && (users | search: searchText:'name':'email':'id') as searchedUsers
|
||||||
[style]="scrollViewportStyle"
|
"
|
||||||
>
|
>
|
||||||
<div class="modal-body" *ngIf="!loading && users && searchedUsers">
|
<div class="d-flex">
|
||||||
<div class="d-flex">
|
<div class="mr-3">
|
||||||
<div class="mr-3">
|
<label class="sr-only" for="search">{{ "search" | i18n }}</label>
|
||||||
<label class="sr-only" for="search">{{ "search" | i18n }}</label>
|
<input
|
||||||
<input
|
type="search"
|
||||||
type="search"
|
class="form-control form-control-sm"
|
||||||
class="form-control form-control-sm"
|
id="search"
|
||||||
id="search"
|
placeholder="{{ 'search' | i18n }}"
|
||||||
placeholder="{{ 'search' | i18n }}"
|
name="SearchText"
|
||||||
name="SearchText"
|
[(ngModel)]="searchText"
|
||||||
[(ngModel)]="searchText"
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="btn-group btn-group-sm" role="group">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-outline-secondary"
|
|
||||||
[ngClass]="{ active: !showSelected }"
|
|
||||||
(click)="filterSelected(false)"
|
|
||||||
>
|
|
||||||
{{ "all" | i18n }}
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-outline-secondary"
|
|
||||||
[ngClass]="{ active: showSelected }"
|
|
||||||
(click)="filterSelected(true)"
|
|
||||||
>
|
|
||||||
{{ "selected" | i18n }}
|
|
||||||
<span class="badge badge-pill badge-info" *ngIf="selectedCount">{{
|
|
||||||
selectedCount
|
|
||||||
}}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="!searchedUsers.length">
|
<div class="btn-group btn-group-sm" role="group">
|
||||||
<hr />
|
<button
|
||||||
{{ "noUsersInList" | i18n }}
|
type="button"
|
||||||
</ng-container>
|
class="btn btn-outline-secondary"
|
||||||
<table class="table table-hover table-list mb-0" [hidden]="!searchedUsers.length">
|
[ngClass]="{ active: !showSelected }"
|
||||||
|
(click)="filterSelected(false)"
|
||||||
|
>
|
||||||
|
{{ "all" | i18n }}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn btn-outline-secondary"
|
||||||
|
[ngClass]="{ active: showSelected }"
|
||||||
|
(click)="filterSelected(true)"
|
||||||
|
>
|
||||||
|
{{ "selected" | i18n }}
|
||||||
|
<span class="badge badge-pill badge-info" *ngIf="selectedCount">{{
|
||||||
|
selectedCount
|
||||||
|
}}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ng-container *ngIf="!searchedUsers.length">
|
||||||
|
<hr />
|
||||||
|
{{ "noUsersInList" | i18n }}
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="searchedUsers.length">
|
||||||
|
<table class="table table-hover table-list mb-0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *cdkVirtualFor="let u of searchedUsers" class="">
|
<tr *ngFor="let u of searchedUsers">
|
||||||
<td class="table-list-checkbox" (click)="check(u)">
|
<td class="table-list-checkbox" (click)="check(u)">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@@ -164,8 +164,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</ng-container>
|
||||||
</cdk-virtual-scroll-viewport>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
|
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
|
||||||
<i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
|
<i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
|
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
|
||||||
|
|
||||||
import { SearchPipe } from "jslib-angular/pipes/search.pipe";
|
|
||||||
import { ApiService } from "jslib-common/abstractions/api.service";
|
import { ApiService } from "jslib-common/abstractions/api.service";
|
||||||
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
||||||
import { LogService } from "jslib-common/abstractions/log.service";
|
import { LogService } from "jslib-common/abstractions/log.service";
|
||||||
@@ -14,7 +13,6 @@ import { OrganizationUserUserDetailsResponse } from "jslib-common/models/respons
|
|||||||
@Component({
|
@Component({
|
||||||
selector: "app-entity-users",
|
selector: "app-entity-users",
|
||||||
templateUrl: "entity-users.component.html",
|
templateUrl: "entity-users.component.html",
|
||||||
providers: [SearchPipe],
|
|
||||||
})
|
})
|
||||||
export class EntityUsersComponent implements OnInit {
|
export class EntityUsersComponent implements OnInit {
|
||||||
@Input() entity: "group" | "collection";
|
@Input() entity: "group" | "collection";
|
||||||
@@ -35,7 +33,6 @@ export class EntityUsersComponent implements OnInit {
|
|||||||
private allUsers: OrganizationUserUserDetailsResponse[] = [];
|
private allUsers: OrganizationUserUserDetailsResponse[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private search: SearchPipe,
|
|
||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService,
|
||||||
@@ -55,14 +52,6 @@ export class EntityUsersComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get searchedUsers() {
|
|
||||||
return this.search.transform(this.users, this.searchText, "name", "email", "id");
|
|
||||||
}
|
|
||||||
|
|
||||||
get scrollViewportStyle() {
|
|
||||||
return `min-height: 120px; height: ${120 + this.searchedUsers.length * 46}px`;
|
|
||||||
}
|
|
||||||
|
|
||||||
async loadUsers() {
|
async loadUsers() {
|
||||||
const users = await this.apiService.getOrganizationUsers(this.organizationId);
|
const users = await this.apiService.getOrganizationUsers(this.organizationId);
|
||||||
this.allUsers = users.data.map((r) => r).sort(Utils.getSortFunction(this.i18nService, "email"));
|
this.allUsers = users.data.map((r) => r).sort(Utils.getSortFunction(this.i18nService, "email"));
|
||||||
@@ -12,8 +12,7 @@ import { SearchService } from "jslib-common/abstractions/search.service";
|
|||||||
import { Utils } from "jslib-common/misc/utils";
|
import { Utils } from "jslib-common/misc/utils";
|
||||||
import { GroupResponse } from "jslib-common/models/response/groupResponse";
|
import { GroupResponse } from "jslib-common/models/response/groupResponse";
|
||||||
|
|
||||||
import { EntityUsersComponent } from "../../modules/organizations/manage/entity-users.component";
|
import { EntityUsersComponent } from "./entity-users.component";
|
||||||
|
|
||||||
import { GroupAddEditComponent } from "./group-add-edit.component";
|
import { GroupAddEditComponent } from "./group-add-edit.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|||||||
@@ -1,89 +0,0 @@
|
|||||||
import { NgModule } from "@angular/core";
|
|
||||||
import { RouterModule, Routes } from "@angular/router";
|
|
||||||
|
|
||||||
import { Permissions } from "jslib-common/enums/permissions";
|
|
||||||
|
|
||||||
import { PermissionsGuard } from "../guards/permissions.guard";
|
|
||||||
import { PoliciesComponent } from "../policies/policies.component";
|
|
||||||
import { NavigationPermissionsService } from "../services/navigation-permissions.service";
|
|
||||||
|
|
||||||
import { CollectionsComponent } from "./collections.component";
|
|
||||||
import { EventsComponent } from "./events.component";
|
|
||||||
import { GroupsComponent } from "./groups.component";
|
|
||||||
import { ManageComponent } from "./manage.component";
|
|
||||||
import { PeopleComponent } from "./people.component";
|
|
||||||
|
|
||||||
const routes: Routes = [
|
|
||||||
{
|
|
||||||
path: "",
|
|
||||||
component: ManageComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
permissions: NavigationPermissionsService.getPermissions("manage"),
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: "",
|
|
||||||
pathMatch: "full",
|
|
||||||
redirectTo: "people",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "collections",
|
|
||||||
component: CollectionsComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
titleId: "collections",
|
|
||||||
permissions: [
|
|
||||||
Permissions.CreateNewCollections,
|
|
||||||
Permissions.EditAnyCollection,
|
|
||||||
Permissions.DeleteAnyCollection,
|
|
||||||
Permissions.EditAssignedCollections,
|
|
||||||
Permissions.DeleteAssignedCollections,
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "events",
|
|
||||||
component: EventsComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
titleId: "eventLogs",
|
|
||||||
permissions: [Permissions.AccessEventLogs],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "groups",
|
|
||||||
component: GroupsComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
titleId: "groups",
|
|
||||||
permissions: [Permissions.ManageGroups],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "people",
|
|
||||||
component: PeopleComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
titleId: "people",
|
|
||||||
permissions: [Permissions.ManageUsers, Permissions.ManageUsersPassword],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "policies",
|
|
||||||
component: PoliciesComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
titleId: "policies",
|
|
||||||
permissions: [Permissions.ManagePolicies],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [RouterModule.forChild(routes)],
|
|
||||||
exports: [RouterModule],
|
|
||||||
})
|
|
||||||
export class ManageRoutingModule {}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
import { CommonModule } from "@angular/common";
|
|
||||||
import { NgModule } from "@angular/core";
|
|
||||||
|
|
||||||
import { SharedModule } from "../../modules/shared.module";
|
|
||||||
import { PoliciesModule } from "../policies/policies.module";
|
|
||||||
|
|
||||||
import { BulkConfirmComponent } from "./bulk/bulk-confirm.component";
|
|
||||||
import { BulkRemoveComponent } from "./bulk/bulk-remove.component";
|
|
||||||
import { BulkStatusComponent } from "./bulk/bulk-status.component";
|
|
||||||
import { CollectionAddEditComponent } from "./collection-add-edit.component";
|
|
||||||
import { CollectionsComponent as ManageCollectionsComponent } from "./collections.component";
|
|
||||||
import { EntityEventsComponent } from "./entity-events.component";
|
|
||||||
import { EventsComponent } from "./events.component";
|
|
||||||
import { GroupAddEditComponent } from "./group-add-edit.component";
|
|
||||||
import { GroupsComponent } from "./groups.component";
|
|
||||||
import { ManageRoutingModule } from "./manage-routing.module";
|
|
||||||
import { ManageComponent } from "./manage.component";
|
|
||||||
import { PeopleComponent } from "./people.component";
|
|
||||||
import { PolicyEditComponent } from "./policy-edit.component";
|
|
||||||
import { ResetPasswordComponent } from "./reset-password.component";
|
|
||||||
import { UserAddEditComponent } from "./user-add-edit.component";
|
|
||||||
import { UserConfirmComponent } from "./user-confirm.component";
|
|
||||||
import { UserGroupsComponent } from "./user-groups.component";
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [CommonModule, SharedModule, PoliciesModule, ManageRoutingModule],
|
|
||||||
declarations: [
|
|
||||||
BulkConfirmComponent,
|
|
||||||
BulkRemoveComponent,
|
|
||||||
BulkStatusComponent,
|
|
||||||
CollectionAddEditComponent,
|
|
||||||
EntityEventsComponent,
|
|
||||||
EventsComponent,
|
|
||||||
GroupAddEditComponent,
|
|
||||||
GroupsComponent,
|
|
||||||
ManageCollectionsComponent,
|
|
||||||
ManageComponent,
|
|
||||||
PeopleComponent,
|
|
||||||
PolicyEditComponent,
|
|
||||||
ResetPasswordComponent,
|
|
||||||
UserAddEditComponent,
|
|
||||||
UserConfirmComponent,
|
|
||||||
UserGroupsComponent,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class ManageModule {}
|
|
||||||
@@ -10,9 +10,9 @@ import { Organization } from "jslib-common/models/domain/organization";
|
|||||||
import { PolicyResponse } from "jslib-common/models/response/policyResponse";
|
import { PolicyResponse } from "jslib-common/models/response/policyResponse";
|
||||||
|
|
||||||
import { PolicyListService } from "../../services/policy-list.service";
|
import { PolicyListService } from "../../services/policy-list.service";
|
||||||
import { PolicyEditComponent } from "../manage/policy-edit.component";
|
import { BasePolicy } from "../policies/base-policy.component";
|
||||||
|
|
||||||
import { BasePolicy } from "./base-policy.component";
|
import { PolicyEditComponent } from "./policy-edit.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-org-policies",
|
selector: "app-org-policies",
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
appA11yTitle="{{ 'learnMore' | i18n }}"
|
appA11yTitle="{{ 'learnMore' | i18n }}"
|
||||||
href="https://bitwarden.com/help/user-types-access-control/"
|
href="https://bitwarden.com/help/provider-users/"
|
||||||
>
|
>
|
||||||
<i class="bwi bwi-question-circle" aria-hidden="true"></i>
|
<i class="bwi bwi-question-circle" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
222
src/app/organizations/organization-routing.module.ts
Normal file
222
src/app/organizations/organization-routing.module.ts
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
import { NgModule } from "@angular/core";
|
||||||
|
import { RouterModule, Routes } from "@angular/router";
|
||||||
|
|
||||||
|
import { AuthGuard } from "jslib-angular/guards/auth.guard";
|
||||||
|
import { Permissions } from "jslib-common/enums/permissions";
|
||||||
|
|
||||||
|
import { PermissionsGuard } from "./guards/permissions.guard";
|
||||||
|
import { OrganizationLayoutComponent } from "./layouts/organization-layout.component";
|
||||||
|
import { CollectionsComponent } from "./manage/collections.component";
|
||||||
|
import { EventsComponent } from "./manage/events.component";
|
||||||
|
import { GroupsComponent } from "./manage/groups.component";
|
||||||
|
import { ManageComponent } from "./manage/manage.component";
|
||||||
|
import { PeopleComponent } from "./manage/people.component";
|
||||||
|
import { PoliciesComponent } from "./manage/policies.component";
|
||||||
|
import { NavigationPermissionsService } from "./services/navigation-permissions.service";
|
||||||
|
import { AccountComponent } from "./settings/account.component";
|
||||||
|
import { OrganizationBillingComponent } from "./settings/organization-billing.component";
|
||||||
|
import { OrganizationSubscriptionComponent } from "./settings/organization-subscription.component";
|
||||||
|
import { SettingsComponent } from "./settings/settings.component";
|
||||||
|
import { TwoFactorSetupComponent } from "./settings/two-factor-setup.component";
|
||||||
|
import { ExportComponent } from "./tools/export.component";
|
||||||
|
import { ExposedPasswordsReportComponent } from "./tools/exposed-passwords-report.component";
|
||||||
|
import { ImportComponent } from "./tools/import.component";
|
||||||
|
import { InactiveTwoFactorReportComponent } from "./tools/inactive-two-factor-report.component";
|
||||||
|
import { ReusedPasswordsReportComponent } from "./tools/reused-passwords-report.component";
|
||||||
|
import { ToolsComponent } from "./tools/tools.component";
|
||||||
|
import { UnsecuredWebsitesReportComponent } from "./tools/unsecured-websites-report.component";
|
||||||
|
import { WeakPasswordsReportComponent } from "./tools/weak-passwords-report.component";
|
||||||
|
|
||||||
|
const routes: Routes = [
|
||||||
|
{
|
||||||
|
path: ":organizationId",
|
||||||
|
component: OrganizationLayoutComponent,
|
||||||
|
canActivate: [AuthGuard, PermissionsGuard],
|
||||||
|
data: {
|
||||||
|
permissions: NavigationPermissionsService.getPermissions("admin"),
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{ path: "", pathMatch: "full", redirectTo: "vault" },
|
||||||
|
{
|
||||||
|
path: "vault",
|
||||||
|
loadChildren: async () =>
|
||||||
|
(await import("../modules/vault/modules/organization-vault/organization-vault.module"))
|
||||||
|
.OrganizationVaultModule,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "tools",
|
||||||
|
component: ToolsComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: { permissions: NavigationPermissionsService.getPermissions("tools") },
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "",
|
||||||
|
pathMatch: "full",
|
||||||
|
redirectTo: "import",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "import",
|
||||||
|
component: ImportComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: {
|
||||||
|
titleId: "importData",
|
||||||
|
permissions: [Permissions.AccessImportExport],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "export",
|
||||||
|
component: ExportComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: {
|
||||||
|
titleId: "exportVault",
|
||||||
|
permissions: [Permissions.AccessImportExport],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "exposed-passwords-report",
|
||||||
|
component: ExposedPasswordsReportComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: {
|
||||||
|
titleId: "exposedPasswordsReport",
|
||||||
|
permissions: [Permissions.AccessReports],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "inactive-two-factor-report",
|
||||||
|
component: InactiveTwoFactorReportComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: {
|
||||||
|
titleId: "inactive2faReport",
|
||||||
|
permissions: [Permissions.AccessReports],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "reused-passwords-report",
|
||||||
|
component: ReusedPasswordsReportComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: {
|
||||||
|
titleId: "reusedPasswordsReport",
|
||||||
|
permissions: [Permissions.AccessReports],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "unsecured-websites-report",
|
||||||
|
component: UnsecuredWebsitesReportComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: {
|
||||||
|
titleId: "unsecuredWebsitesReport",
|
||||||
|
permissions: [Permissions.AccessReports],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "weak-passwords-report",
|
||||||
|
component: WeakPasswordsReportComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: {
|
||||||
|
titleId: "weakPasswordsReport",
|
||||||
|
permissions: [Permissions.AccessReports],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "manage",
|
||||||
|
component: ManageComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: {
|
||||||
|
permissions: NavigationPermissionsService.getPermissions("manage"),
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "",
|
||||||
|
pathMatch: "full",
|
||||||
|
redirectTo: "people",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "collections",
|
||||||
|
component: CollectionsComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: {
|
||||||
|
titleId: "collections",
|
||||||
|
permissions: [
|
||||||
|
Permissions.CreateNewCollections,
|
||||||
|
Permissions.EditAnyCollection,
|
||||||
|
Permissions.DeleteAnyCollection,
|
||||||
|
Permissions.EditAssignedCollections,
|
||||||
|
Permissions.DeleteAssignedCollections,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "events",
|
||||||
|
component: EventsComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: {
|
||||||
|
titleId: "eventLogs",
|
||||||
|
permissions: [Permissions.AccessEventLogs],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "groups",
|
||||||
|
component: GroupsComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: {
|
||||||
|
titleId: "groups",
|
||||||
|
permissions: [Permissions.ManageGroups],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "people",
|
||||||
|
component: PeopleComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: {
|
||||||
|
titleId: "people",
|
||||||
|
permissions: [Permissions.ManageUsers, Permissions.ManageUsersPassword],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "policies",
|
||||||
|
component: PoliciesComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: {
|
||||||
|
titleId: "policies",
|
||||||
|
permissions: [Permissions.ManagePolicies],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "settings",
|
||||||
|
component: SettingsComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: { permissions: NavigationPermissionsService.getPermissions("settings") },
|
||||||
|
children: [
|
||||||
|
{ path: "", pathMatch: "full", redirectTo: "account" },
|
||||||
|
{ path: "account", component: AccountComponent, data: { titleId: "myOrganization" } },
|
||||||
|
{
|
||||||
|
path: "two-factor",
|
||||||
|
component: TwoFactorSetupComponent,
|
||||||
|
data: { titleId: "twoStepLogin" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "billing",
|
||||||
|
component: OrganizationBillingComponent,
|
||||||
|
canActivate: [PermissionsGuard],
|
||||||
|
data: { titleId: "billing", permissions: [Permissions.ManageBilling] },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "subscription",
|
||||||
|
component: OrganizationSubscriptionComponent,
|
||||||
|
data: { titleId: "subscription" },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [RouterModule.forChild(routes)],
|
||||||
|
exports: [RouterModule],
|
||||||
|
})
|
||||||
|
export class OrganizationsRoutingModule {}
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
import { NgModule } from "@angular/core";
|
|
||||||
import { RouterModule, Routes } from "@angular/router";
|
|
||||||
|
|
||||||
import { AuthGuard } from "jslib-angular/guards/auth.guard";
|
|
||||||
|
|
||||||
import { PermissionsGuard } from "./guards/permissions.guard";
|
|
||||||
import { OrganizationLayoutComponent } from "./layouts/organization-layout.component";
|
|
||||||
import { NavigationPermissionsService } from "./services/navigation-permissions.service";
|
|
||||||
|
|
||||||
const routes: Routes = [
|
|
||||||
{
|
|
||||||
path: ":organizationId",
|
|
||||||
component: OrganizationLayoutComponent,
|
|
||||||
canActivate: [AuthGuard, PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
permissions: NavigationPermissionsService.getPermissions("admin"),
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{ path: "", pathMatch: "full", redirectTo: "vault" },
|
|
||||||
{
|
|
||||||
path: "vault",
|
|
||||||
loadChildren: async () =>
|
|
||||||
(await import("../modules/vault/modules/organization-vault/organization-vault.module"))
|
|
||||||
.OrganizationVaultModule,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "tools",
|
|
||||||
loadChildren: async () => (await import("./tools/tools.module")).ToolsModule,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "manage",
|
|
||||||
loadChildren: async () => (await import("./manage/manage.module")).ManageModule,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "settings",
|
|
||||||
loadChildren: async () => (await import("./settings/settings.module")).SettingsModule,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [RouterModule.forChild(routes)],
|
|
||||||
exports: [RouterModule],
|
|
||||||
})
|
|
||||||
export class OrganizationsRoutingModule {}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import { CommonModule } from "@angular/common";
|
|
||||||
import { NgModule } from "@angular/core";
|
|
||||||
|
|
||||||
import { LayoutsModule } from "../layouts/layouts.module";
|
|
||||||
import { SharedModule } from "../modules/shared.module";
|
|
||||||
|
|
||||||
import { OrganizationLayoutComponent } from "./layouts/organization-layout.component";
|
|
||||||
import { OrganizationSwitcherComponent } from "./layouts/organization-switcher.component";
|
|
||||||
import { OrganizationsRoutingModule } from "./organizations-routing.module";
|
|
||||||
import { AcceptFamilySponsorshipComponent } from "./sponsorships/accept-family-sponsorship.component";
|
|
||||||
import { FamiliesForEnterpriseSetupComponent } from "./sponsorships/families-for-enterprise-setup.component";
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [CommonModule, OrganizationsRoutingModule, SharedModule, LayoutsModule],
|
|
||||||
declarations: [
|
|
||||||
AcceptFamilySponsorshipComponent,
|
|
||||||
FamiliesForEnterpriseSetupComponent,
|
|
||||||
OrganizationLayoutComponent,
|
|
||||||
OrganizationSwitcherComponent,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class OrganizationsModule {}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
import { CommonModule } from "@angular/common";
|
|
||||||
import { NgModule } from "@angular/core";
|
|
||||||
|
|
||||||
import { SharedModule } from "../../modules/shared.module";
|
|
||||||
|
|
||||||
import { DisableSendPolicyComponent } from "./disable-send.component";
|
|
||||||
import { MasterPasswordPolicyComponent } from "./master-password.component";
|
|
||||||
import { PasswordGeneratorPolicyComponent } from "./password-generator.component";
|
|
||||||
import { PersonalOwnershipPolicyComponent } from "./personal-ownership.component";
|
|
||||||
import { PoliciesComponent } from "./policies.component";
|
|
||||||
import { RequireSsoPolicyComponent } from "./require-sso.component";
|
|
||||||
import { ResetPasswordPolicyComponent } from "./reset-password.component";
|
|
||||||
import { SendOptionsPolicyComponent } from "./send-options.component";
|
|
||||||
import { SingleOrgPolicyComponent } from "./single-org.component";
|
|
||||||
import { TwoFactorAuthenticationPolicyComponent } from "./two-factor-authentication.component";
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [CommonModule, SharedModule],
|
|
||||||
declarations: [
|
|
||||||
DisableSendPolicyComponent,
|
|
||||||
MasterPasswordPolicyComponent,
|
|
||||||
PasswordGeneratorPolicyComponent,
|
|
||||||
PersonalOwnershipPolicyComponent,
|
|
||||||
RequireSsoPolicyComponent,
|
|
||||||
ResetPasswordPolicyComponent,
|
|
||||||
SendOptionsPolicyComponent,
|
|
||||||
SingleOrgPolicyComponent,
|
|
||||||
TwoFactorAuthenticationPolicyComponent,
|
|
||||||
PoliciesComponent,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class PoliciesModule {}
|
|
||||||
@@ -12,9 +12,9 @@ import { BillingResponse } from "jslib-common/models/response/billingResponse";
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-org-billing",
|
selector: "app-org-billing",
|
||||||
templateUrl: "./billing.component.html",
|
templateUrl: "./organization-billing.component.html",
|
||||||
})
|
})
|
||||||
export class BillingComponent implements OnInit {
|
export class OrganizationBillingComponent implements OnInit {
|
||||||
loading = false;
|
loading = false;
|
||||||
firstLoaded = false;
|
firstLoaded = false;
|
||||||
showAdjustPayment = false;
|
showAdjustPayment = false;
|
||||||
@@ -23,9 +23,9 @@ import { BillingSyncApiKeyComponent } from "./billing-sync-api-key.component";
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-org-subscription",
|
selector: "app-org-subscription",
|
||||||
templateUrl: "subscription.component.html",
|
templateUrl: "organization-subscription.component.html",
|
||||||
})
|
})
|
||||||
export class SubscriptionComponent implements OnInit {
|
export class OrganizationSubscriptionComponent implements OnInit {
|
||||||
@ViewChild("setupBillingSyncTemplate", { read: ViewContainerRef, static: true })
|
@ViewChild("setupBillingSyncTemplate", { read: ViewContainerRef, static: true })
|
||||||
setupBillingSyncModalRef: ViewContainerRef;
|
setupBillingSyncModalRef: ViewContainerRef;
|
||||||
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
import { NgModule } from "@angular/core";
|
|
||||||
import { RouterModule, Routes } from "@angular/router";
|
|
||||||
|
|
||||||
import { Permissions } from "jslib-common/enums/permissions";
|
|
||||||
|
|
||||||
import { PermissionsGuard } from "../guards/permissions.guard";
|
|
||||||
import { NavigationPermissionsService } from "../services/navigation-permissions.service";
|
|
||||||
|
|
||||||
import { AccountComponent } from "./account.component";
|
|
||||||
import { BillingComponent } from "./billing.component";
|
|
||||||
import { SettingsComponent } from "./settings.component";
|
|
||||||
import { SubscriptionComponent } from "./subscription.component";
|
|
||||||
import { TwoFactorSetupComponent } from "./two-factor-setup.component";
|
|
||||||
|
|
||||||
const routes: Routes = [
|
|
||||||
{
|
|
||||||
path: "",
|
|
||||||
component: SettingsComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: { permissions: NavigationPermissionsService.getPermissions("settings") },
|
|
||||||
children: [
|
|
||||||
{ path: "", pathMatch: "full", redirectTo: "account" },
|
|
||||||
{ path: "account", component: AccountComponent, data: { titleId: "myOrganization" } },
|
|
||||||
{
|
|
||||||
path: "two-factor",
|
|
||||||
component: TwoFactorSetupComponent,
|
|
||||||
data: { titleId: "twoStepLogin" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "billing",
|
|
||||||
component: BillingComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: { titleId: "billing", permissions: [Permissions.ManageBilling] },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "subscription",
|
|
||||||
component: SubscriptionComponent,
|
|
||||||
data: { titleId: "subscription" },
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [RouterModule.forChild(routes)],
|
|
||||||
exports: [RouterModule],
|
|
||||||
})
|
|
||||||
export class SettingsRoutingModule {}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
import { CommonModule } from "@angular/common";
|
|
||||||
import { NgModule } from "@angular/core";
|
|
||||||
|
|
||||||
import { SharedModule } from "../../modules/shared.module";
|
|
||||||
|
|
||||||
import { AccountComponent } from "./account.component";
|
|
||||||
import { AdjustSubscription } from "./adjust-subscription.component";
|
|
||||||
import { BillingSyncApiKeyComponent } from "./billing-sync-api-key.component";
|
|
||||||
import { BillingComponent } from "./billing.component";
|
|
||||||
import { ChangePlanComponent } from "./change-plan.component";
|
|
||||||
import { DeleteOrganizationComponent } from "./delete-organization.component";
|
|
||||||
import { DownloadLicenseComponent } from "./download-license.component";
|
|
||||||
import { ImageSubscriptionHiddenComponent } from "./image-subscription-hidden.component";
|
|
||||||
import { SettingsRoutingModule } from "./settings-routing.module";
|
|
||||||
import { SettingsComponent } from "./settings.component";
|
|
||||||
import { SubscriptionComponent } from "./subscription.component";
|
|
||||||
import { TwoFactorSetupComponent } from "./two-factor-setup.component";
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [CommonModule, SharedModule, SettingsRoutingModule],
|
|
||||||
declarations: [
|
|
||||||
AccountComponent,
|
|
||||||
AdjustSubscription,
|
|
||||||
BillingComponent,
|
|
||||||
BillingSyncApiKeyComponent,
|
|
||||||
ChangePlanComponent,
|
|
||||||
DeleteOrganizationComponent,
|
|
||||||
DownloadLicenseComponent,
|
|
||||||
ImageSubscriptionHiddenComponent,
|
|
||||||
SettingsComponent,
|
|
||||||
SubscriptionComponent,
|
|
||||||
TwoFactorSetupComponent,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class SettingsModule {}
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
import { NgModule } from "@angular/core";
|
|
||||||
import { RouterModule, Routes } from "@angular/router";
|
|
||||||
|
|
||||||
import { Permissions } from "jslib-common/enums/permissions";
|
|
||||||
|
|
||||||
import { PermissionsGuard } from "../guards/permissions.guard";
|
|
||||||
import { NavigationPermissionsService } from "../services/navigation-permissions.service";
|
|
||||||
|
|
||||||
import { ExportComponent } from "./export.component";
|
|
||||||
import { ExposedPasswordsReportComponent } from "./exposed-passwords-report.component";
|
|
||||||
import { ImportComponent } from "./import.component";
|
|
||||||
import { InactiveTwoFactorReportComponent } from "./inactive-two-factor-report.component";
|
|
||||||
import { ReusedPasswordsReportComponent } from "./reused-passwords-report.component";
|
|
||||||
import { ToolsComponent } from "./tools.component";
|
|
||||||
import { UnsecuredWebsitesReportComponent } from "./unsecured-websites-report.component";
|
|
||||||
import { WeakPasswordsReportComponent } from "./weak-passwords-report.component";
|
|
||||||
|
|
||||||
const routes: Routes = [
|
|
||||||
{
|
|
||||||
path: "",
|
|
||||||
component: ToolsComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: { permissions: NavigationPermissionsService.getPermissions("tools") },
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: "",
|
|
||||||
pathMatch: "full",
|
|
||||||
redirectTo: "import",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "import",
|
|
||||||
component: ImportComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
titleId: "importData",
|
|
||||||
permissions: [Permissions.AccessImportExport],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "export",
|
|
||||||
component: ExportComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
titleId: "exportVault",
|
|
||||||
permissions: [Permissions.AccessImportExport],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "exposed-passwords-report",
|
|
||||||
component: ExposedPasswordsReportComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
titleId: "exposedPasswordsReport",
|
|
||||||
permissions: [Permissions.AccessReports],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "inactive-two-factor-report",
|
|
||||||
component: InactiveTwoFactorReportComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
titleId: "inactive2faReport",
|
|
||||||
permissions: [Permissions.AccessReports],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "reused-passwords-report",
|
|
||||||
component: ReusedPasswordsReportComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
titleId: "reusedPasswordsReport",
|
|
||||||
permissions: [Permissions.AccessReports],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "unsecured-websites-report",
|
|
||||||
component: UnsecuredWebsitesReportComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
titleId: "unsecuredWebsitesReport",
|
|
||||||
permissions: [Permissions.AccessReports],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "weak-passwords-report",
|
|
||||||
component: WeakPasswordsReportComponent,
|
|
||||||
canActivate: [PermissionsGuard],
|
|
||||||
data: {
|
|
||||||
titleId: "weakPasswordsReport",
|
|
||||||
permissions: [Permissions.AccessReports],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [RouterModule.forChild(routes)],
|
|
||||||
exports: [RouterModule],
|
|
||||||
})
|
|
||||||
export class ToolsRoutingModule {}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
import { CommonModule } from "@angular/common";
|
|
||||||
import { NgModule } from "@angular/core";
|
|
||||||
|
|
||||||
import { SharedModule } from "../../modules/shared.module";
|
|
||||||
|
|
||||||
import { ExportComponent } from "./export.component";
|
|
||||||
import { ExposedPasswordsReportComponent } from "./exposed-passwords-report.component";
|
|
||||||
import { ImportComponent } from "./import.component";
|
|
||||||
import { InactiveTwoFactorReportComponent } from "./inactive-two-factor-report.component";
|
|
||||||
import { ReusedPasswordsReportComponent } from "./reused-passwords-report.component";
|
|
||||||
import { ToolsRoutingModule } from "./tools-routing.module";
|
|
||||||
import { ToolsComponent } from "./tools.component";
|
|
||||||
import { UnsecuredWebsitesReportComponent } from "./unsecured-websites-report.component";
|
|
||||||
import { WeakPasswordsReportComponent } from "./weak-passwords-report.component";
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [CommonModule, SharedModule, ToolsRoutingModule],
|
|
||||||
declarations: [
|
|
||||||
ExportComponent,
|
|
||||||
ExposedPasswordsReportComponent,
|
|
||||||
ImportComponent,
|
|
||||||
InactiveTwoFactorReportComponent,
|
|
||||||
ReusedPasswordsReportComponent,
|
|
||||||
ToolsComponent,
|
|
||||||
UnsecuredWebsitesReportComponent,
|
|
||||||
WeakPasswordsReportComponent,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class ToolsModule {}
|
|
||||||
@@ -22,11 +22,11 @@ import { Organization } from "jslib-common/models/domain/organization";
|
|||||||
import { CipherCreateRequest } from "jslib-common/models/request/cipherCreateRequest";
|
import { CipherCreateRequest } from "jslib-common/models/request/cipherCreateRequest";
|
||||||
import { CipherRequest } from "jslib-common/models/request/cipherRequest";
|
import { CipherRequest } from "jslib-common/models/request/cipherRequest";
|
||||||
|
|
||||||
import { AddEditComponent as BaseAddEditComponent } from "../../../../vault/add-edit.component";
|
import { AddEditComponent as BaseAddEditComponent } from "../../vault/add-edit.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-org-vault-add-edit",
|
selector: "app-org-vault-add-edit",
|
||||||
templateUrl: "../../../../vault/add-edit.component.html",
|
templateUrl: "../../vault/add-edit.component.html",
|
||||||
})
|
})
|
||||||
export class AddEditComponent extends BaseAddEditComponent {
|
export class AddEditComponent extends BaseAddEditComponent {
|
||||||
organization: Organization;
|
organization: Organization;
|
||||||
@@ -12,11 +12,11 @@ import { Cipher } from "jslib-common/models/domain/cipher";
|
|||||||
import { Organization } from "jslib-common/models/domain/organization";
|
import { Organization } from "jslib-common/models/domain/organization";
|
||||||
import { AttachmentView } from "jslib-common/models/view/attachmentView";
|
import { AttachmentView } from "jslib-common/models/view/attachmentView";
|
||||||
|
|
||||||
import { AttachmentsComponent as BaseAttachmentsComponent } from "../../../../vault/attachments.component";
|
import { AttachmentsComponent as BaseAttachmentsComponent } from "../../vault/attachments.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-org-vault-attachments",
|
selector: "app-org-vault-attachments",
|
||||||
templateUrl: "../../../../vault/attachments.component.html",
|
templateUrl: "../../vault/attachments.component.html",
|
||||||
})
|
})
|
||||||
export class AttachmentsComponent extends BaseAttachmentsComponent {
|
export class AttachmentsComponent extends BaseAttachmentsComponent {
|
||||||
viewOnly = false;
|
viewOnly = false;
|
||||||
@@ -15,11 +15,11 @@ import { TotpService } from "jslib-common/abstractions/totp.service";
|
|||||||
import { Organization } from "jslib-common/models/domain/organization";
|
import { Organization } from "jslib-common/models/domain/organization";
|
||||||
import { CipherView } from "jslib-common/models/view/cipherView";
|
import { CipherView } from "jslib-common/models/view/cipherView";
|
||||||
|
|
||||||
import { CiphersComponent as BaseCiphersComponent } from "../../../../vault/ciphers.component";
|
import { CiphersComponent as BaseCiphersComponent } from "../../vault/ciphers.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-org-vault-ciphers",
|
selector: "app-org-vault-ciphers",
|
||||||
templateUrl: "../../../../vault/ciphers.component.html",
|
templateUrl: "../../vault/ciphers.component.html",
|
||||||
})
|
})
|
||||||
export class CiphersComponent extends BaseCiphersComponent {
|
export class CiphersComponent extends BaseCiphersComponent {
|
||||||
@Output() onEventsClicked = new EventEmitter<CipherView>();
|
@Output() onEventsClicked = new EventEmitter<CipherView>();
|
||||||
@@ -11,11 +11,11 @@ import { Cipher } from "jslib-common/models/domain/cipher";
|
|||||||
import { Organization } from "jslib-common/models/domain/organization";
|
import { Organization } from "jslib-common/models/domain/organization";
|
||||||
import { CipherCollectionsRequest } from "jslib-common/models/request/cipherCollectionsRequest";
|
import { CipherCollectionsRequest } from "jslib-common/models/request/cipherCollectionsRequest";
|
||||||
|
|
||||||
import { CollectionsComponent as BaseCollectionsComponent } from "../../../../vault/collections.component";
|
import { CollectionsComponent as BaseCollectionsComponent } from "../../vault/collections.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-org-vault-collections",
|
selector: "app-org-vault-collections",
|
||||||
templateUrl: "../../../../vault/collections.component.html",
|
templateUrl: "../../vault/collections.component.html",
|
||||||
})
|
})
|
||||||
export class CollectionsComponent extends BaseCollectionsComponent {
|
export class CollectionsComponent extends BaseCollectionsComponent {
|
||||||
organization: Organization;
|
organization: Organization;
|
||||||
@@ -233,8 +233,10 @@ const routes: Routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "organizations",
|
path: "organizations",
|
||||||
loadChildren: async () =>
|
loadChildren: () =>
|
||||||
(await import("./organizations/organizations.module")).OrganizationsModule,
|
import("./organizations/organization-routing.module").then(
|
||||||
|
(m) => m.OrganizationsRoutingModule
|
||||||
|
),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,18 @@
|
|||||||
import { NgModule } from "@angular/core";
|
import { NgModule } from "@angular/core";
|
||||||
|
|
||||||
import { LooseComponentsModule } from "./modules/loose-components.module";
|
import { LooseComponentsModule } from "./modules/loose-components.module";
|
||||||
import { OrganizationManageModule } from "./modules/organizations/manage/organization-manage.module";
|
|
||||||
import { OrganizationUserModule } from "./modules/organizations/users/organization-user.module";
|
|
||||||
import { PipesModule } from "./modules/pipes/pipes.module";
|
import { PipesModule } from "./modules/pipes/pipes.module";
|
||||||
|
import { SharedModule } from "./modules/shared.module";
|
||||||
import { VaultFilterModule } from "./modules/vault-filter/vault-filter.module";
|
import { VaultFilterModule } from "./modules/vault-filter/vault-filter.module";
|
||||||
import { OrganizationBadgeModule } from "./modules/vault/modules/organization-badge/organization-badge.module";
|
import { OrganizationBadgeModule } from "./modules/vault/modules/organization-badge/organization-badge.module";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
SharedModule,
|
||||||
LooseComponentsModule,
|
LooseComponentsModule,
|
||||||
VaultFilterModule,
|
VaultFilterModule,
|
||||||
OrganizationBadgeModule,
|
OrganizationBadgeModule,
|
||||||
PipesModule,
|
PipesModule,
|
||||||
OrganizationManageModule,
|
|
||||||
OrganizationUserModule,
|
|
||||||
],
|
],
|
||||||
exports: [LooseComponentsModule, VaultFilterModule, OrganizationBadgeModule, PipesModule],
|
exports: [LooseComponentsModule, VaultFilterModule, OrganizationBadgeModule, PipesModule],
|
||||||
bootstrap: [],
|
bootstrap: [],
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { CipherRepromptType } from "jslib-common/enums/cipherRepromptType";
|
|||||||
import { Organization } from "jslib-common/models/domain/organization";
|
import { Organization } from "jslib-common/models/domain/organization";
|
||||||
import { CipherView } from "jslib-common/models/view/cipherView";
|
import { CipherView } from "jslib-common/models/view/cipherView";
|
||||||
|
|
||||||
import { AddEditComponent as OrgAddEditComponent } from "../modules/vault/modules/organization-vault/add-edit.component";
|
import { AddEditComponent as OrgAddEditComponent } from "../organizations/vault/add-edit.component";
|
||||||
import { AddEditComponent } from "../vault/add-edit.component";
|
import { AddEditComponent } from "../vault/add-edit.component";
|
||||||
|
|
||||||
@Directive()
|
@Directive()
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<form #form (ngSubmit)="load()" [appApiAction]="formPromise" class="container" ngNativeValidate>
|
<form #form (ngSubmit)="load()" [appApiAction]="formPromise" class="container" ngNativeValidate>
|
||||||
<div class="row justify-content-center mt-5">
|
<div class="row justify-content-center mt-5">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<h1 class="lead text-center mb-4">Bitwarden Send</h1>
|
<p class="lead text-center mb-4">Bitwarden Send</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 text-center" *ngIf="creatorIdentifier != null">
|
<div class="col-12 text-center" *ngIf="creatorIdentifier != null">
|
||||||
<p>{{ "sendCreatorIdentifier" | i18n: creatorIdentifier }}</p>
|
<p>{{ "sendCreatorIdentifier" | i18n: creatorIdentifier }}</p>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { Component } from "@angular/core";
|
|||||||
import { ApiService } from "jslib-common/abstractions/api.service";
|
import { ApiService } from "jslib-common/abstractions/api.service";
|
||||||
import { LogService } from "jslib-common/abstractions/log.service";
|
import { LogService } from "jslib-common/abstractions/log.service";
|
||||||
import { OrganizationConnectionType } from "jslib-common/enums/organizationConnectionType";
|
import { OrganizationConnectionType } from "jslib-common/enums/organizationConnectionType";
|
||||||
|
import { Utils } from "jslib-common/misc/utils";
|
||||||
import { BillingSyncConfigApi } from "jslib-common/models/api/billingSyncConfigApi";
|
import { BillingSyncConfigApi } from "jslib-common/models/api/billingSyncConfigApi";
|
||||||
import { BillingSyncConfigRequest } from "jslib-common/models/request/billingSyncConfigRequest";
|
import { BillingSyncConfigRequest } from "jslib-common/models/request/billingSyncConfigRequest";
|
||||||
import { OrganizationConnectionRequest } from "jslib-common/models/request/organizationConnectionRequest";
|
import { OrganizationConnectionRequest } from "jslib-common/models/request/organizationConnectionRequest";
|
||||||
|
|||||||
@@ -4163,7 +4163,7 @@
|
|||||||
"message": "Password reset success!"
|
"message": "Password reset success!"
|
||||||
},
|
},
|
||||||
"resetPasswordEnrollmentWarning": {
|
"resetPasswordEnrollmentWarning": {
|
||||||
"message": "Enrollment will allow organization administrators to change your master password"
|
"message": "Enrollment will allow organization administrators to change your master password. Are you sure you want to enroll?"
|
||||||
},
|
},
|
||||||
"resetPasswordPolicy": {
|
"resetPasswordPolicy": {
|
||||||
"message": "Master Password Reset"
|
"message": "Master Password Reset"
|
||||||
|
|||||||
@@ -204,60 +204,8 @@ const devServer =
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
key: "Content-Security-Policy",
|
key: "Content-Security-Policy",
|
||||||
value: `
|
value:
|
||||||
default-src 'self';
|
"default-src 'self'; script-src 'self' 'sha256-ryoU+5+IUZTuUyTElqkrQGBJXr1brEv6r2CA62WUw8w=' https://js.stripe.com https://js.braintreegateway.com https://www.paypalobjects.com; style-src 'self' https://assets.braintreegateway.com https://*.paypal.com 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=' 'sha256-JVRXyYPueLWdwGwY9m/7u4QlZ1xeQdqUj2t8OVIzZE4='; img-src 'self' data: https://icons.bitwarden.net https://*.paypal.com https://www.paypalobjects.com https://q.stripe.com https://haveibeenpwned.com https://www.gravatar.com; child-src 'self' https://js.stripe.com https://assets.braintreegateway.com https://*.paypal.com https://*.duosecurity.com; frame-src 'self' https://js.stripe.com https://assets.braintreegateway.com https://*.paypal.com https://*.duosecurity.com; connect-src 'self' wss://notifications.bitwarden.com https://notifications.bitwarden.com https://cdn.bitwarden.net https://api.pwnedpasswords.com https://2fa.directory/api/v3/totp.json https://api.stripe.com https://www.paypal.com https://api.braintreegateway.com https://client-analytics.braintreegateway.com https://*.braintree-api.com https://*.blob.core.windows.net https://app.simplelogin.io/api/alias/random/new https://app.anonaddy.com/api/v1/aliases; object-src 'self' blob:;",
|
||||||
script-src
|
|
||||||
'self'
|
|
||||||
'sha256-ryoU+5+IUZTuUyTElqkrQGBJXr1brEv6r2CA62WUw8w='
|
|
||||||
https://js.stripe.com
|
|
||||||
https://js.braintreegateway.com
|
|
||||||
https://www.paypalobjects.com;
|
|
||||||
style-src
|
|
||||||
'self'
|
|
||||||
https://assets.braintreegateway.com
|
|
||||||
https://*.paypal.com
|
|
||||||
'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='
|
|
||||||
'sha256-JVRXyYPueLWdwGwY9m/7u4QlZ1xeQdqUj2t8OVIzZE4=';
|
|
||||||
'sha256-0xHKHIT3+e2Gknxsm/cpErSprhL+o254L/y5bljg74U='
|
|
||||||
img-src
|
|
||||||
'self'
|
|
||||||
data:
|
|
||||||
https://icons.bitwarden.net
|
|
||||||
https://*.paypal.com
|
|
||||||
https://www.paypalobjects.com
|
|
||||||
https://q.stripe.com
|
|
||||||
https://haveibeenpwned.com
|
|
||||||
https://www.gravatar.com;
|
|
||||||
child-src
|
|
||||||
'self'
|
|
||||||
https://js.stripe.com
|
|
||||||
https://assets.braintreegateway.com
|
|
||||||
https://*.paypal.com
|
|
||||||
https://*.duosecurity.com;
|
|
||||||
frame-src
|
|
||||||
'self'
|
|
||||||
https://js.stripe.com
|
|
||||||
https://assets.braintreegateway.com
|
|
||||||
https://*.paypal.com
|
|
||||||
https://*.duosecurity.com;
|
|
||||||
connect-src
|
|
||||||
'self'
|
|
||||||
wss://notifications.bitwarden.com
|
|
||||||
https://notifications.bitwarden.com
|
|
||||||
https://cdn.bitwarden.net
|
|
||||||
https://api.pwnedpasswords.com
|
|
||||||
https://2fa.directory/api/v3/totp.json
|
|
||||||
https://api.stripe.com
|
|
||||||
https://www.paypal.com
|
|
||||||
https://api.braintreegateway.com
|
|
||||||
https://client-analytics.braintreegateway.com
|
|
||||||
https://*.braintree-api.com
|
|
||||||
https://*.blob.core.windows.net
|
|
||||||
https://app.simplelogin.io/api/alias/random/new
|
|
||||||
https://app.anonaddy.com/api/v1/aliases;
|
|
||||||
object-src
|
|
||||||
'self'
|
|
||||||
blob:;`,
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user