From dc2078ae5888860737fdc78de8e5e9a2f1d74566 Mon Sep 17 00:00:00 2001 From: Jake Fink Date: Wed, 11 May 2022 11:13:42 -0400 Subject: [PATCH 01/45] add better error handling to tax call (#1666) --- src/app/settings/tax-info.component.ts | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/app/settings/tax-info.component.ts b/src/app/settings/tax-info.component.ts index 0f7ff992..f36feadd 100644 --- a/src/app/settings/tax-info.component.ts +++ b/src/app/settings/tax-info.component.ts @@ -73,10 +73,14 @@ export class TaxInfoComponent { this.logService.error(e); } } else { - const taxInfo = await this.apiService.getTaxInfo(); - if (taxInfo) { - this.taxInfo.postalCode = taxInfo.postalCode; - this.taxInfo.country = taxInfo.country || "US"; + try { + const taxInfo = await this.apiService.getTaxInfo(); + if (taxInfo) { + this.taxInfo.postalCode = taxInfo.postalCode; + this.taxInfo.country = taxInfo.country || "US"; + } + } catch (e) { + this.logService.error(e); } } this.pristine = Object.assign({}, this.taxInfo); @@ -86,9 +90,16 @@ export class TaxInfoComponent { } }); - const taxRates = await this.apiService.getTaxRates(); - this.taxRates = taxRates.data; - this.loading = false; + try { + const taxRates = await this.apiService.getTaxRates(); + if (taxRates) { + this.taxRates = taxRates.data; + } + } catch (e) { + this.logService.error(e); + } finally { + this.loading = false; + } } get taxRate() { From ccf0d64a7ba269aa4fda8bf986625a25d4a9687d Mon Sep 17 00:00:00 2001 From: Robyn MacCallum Date: Wed, 11 May 2022 13:32:42 -0400 Subject: [PATCH 02/45] Use correct localization string (#1665) --- .../components/organization-filter.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/modules/vault-filter/components/organization-filter.component.html b/src/app/modules/vault-filter/components/organization-filter.component.html index 4844237b..90c28359 100644 --- a/src/app/modules/vault-filter/components/organization-filter.component.html +++ b/src/app/modules/vault-filter/components/organization-filter.component.html @@ -49,7 +49,7 @@ href="#" routerLink="/settings/create-organization" class="text-muted ml-auto create-organization-link" - appA11yTitle="{{ 'addOrganization' | i18n }}" + appA11yTitle="{{ 'newOrganization' | i18n }}" > @@ -114,7 +114,7 @@ href="#" routerLink="/settings/create-organization" class="text-muted ml-auto create-organization-link" - appA11yTitle="{{ 'addOrganization' | i18n }}" + appA11yTitle="{{ 'newOrganization' | i18n }}" > From 1dc95026765e56fe1e81597c76332a150b5045d4 Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Wed, 11 May 2022 14:10:02 -0400 Subject: [PATCH 03/45] [fix] Update the navbar when creating an organization for the first time (#1668) --- src/app/layouts/navbar.component.ts | 25 ++++++++++++++++--- .../settings/organization-plans.component.ts | 5 +++- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/app/layouts/navbar.component.ts b/src/app/layouts/navbar.component.ts index 41585ef4..d93ec65d 100644 --- a/src/app/layouts/navbar.component.ts +++ b/src/app/layouts/navbar.component.ts @@ -1,5 +1,6 @@ -import { Component, OnInit } from "@angular/core"; +import { Component, NgZone, OnInit } from "@angular/core"; +import { BroadcasterService } from "jslib-common/abstractions/broadcaster.service"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { MessagingService } from "jslib-common/abstractions/messaging.service"; import { OrganizationService } from "jslib-common/abstractions/organization.service"; @@ -31,7 +32,9 @@ export class NavbarComponent implements OnInit { private providerService: ProviderService, private syncService: SyncService, private organizationService: OrganizationService, - private i18nService: I18nService + private i18nService: I18nService, + private broadcasterService: BroadcasterService, + private ngZone: NgZone ) { this.selfHosted = this.platformUtilsService.isSelfHost(); } @@ -49,8 +52,24 @@ export class NavbarComponent implements OnInit { } this.providers = await this.providerService.getAll(); + this.organizations = await this.buildOrganizations(); + + this.broadcasterService.subscribe(this.constructor.name, async (message: any) => { + this.ngZone.run(async () => { + switch (message.command) { + case "organizationCreated": + if (this.organizations.length < 1) { + this.organizations = await this.buildOrganizations(); + } + break; + } + }); + }); + } + + async buildOrganizations() { const allOrgs = await this.organizationService.getAll(); - this.organizations = allOrgs + return allOrgs .filter((org) => OrgNavigationPermissionsService.canAccessAdmin(org)) .sort(Utils.getSortFunction(this.i18nService, "name")); } diff --git a/src/app/settings/organization-plans.component.ts b/src/app/settings/organization-plans.component.ts index 7096aef1..73da459e 100644 --- a/src/app/settings/organization-plans.component.ts +++ b/src/app/settings/organization-plans.component.ts @@ -5,6 +5,7 @@ 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 { MessagingService } from "jslib-common/abstractions/messaging.service"; import { OrganizationService } from "jslib-common/abstractions/organization.service"; import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service"; import { PolicyService } from "jslib-common/abstractions/policy.service"; @@ -68,7 +69,8 @@ export class OrganizationPlansComponent implements OnInit { private syncService: SyncService, private policyService: PolicyService, private organizationService: OrganizationService, - private logService: LogService + private logService: LogService, + private messagingService: MessagingService ) { this.selfHosted = platformUtilsService.isSelfHost(); } @@ -298,6 +300,7 @@ export class OrganizationPlansComponent implements OnInit { this.formPromise = doSubmit(); const organizationId = await this.formPromise; this.onSuccess.emit({ organizationId: organizationId }); + this.messagingService.send("organizationCreated", organizationId); } catch (e) { this.logService.error(e); } From f5245a280e1cab5bae613d35e5aacf33983d173e Mon Sep 17 00:00:00 2001 From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Date: Wed, 11 May 2022 15:39:39 -0400 Subject: [PATCH 04/45] [bug:euvr] Create Organization Updates (#1664) --- src/app/accounts/login.component.ts | 2 +- src/app/accounts/register.component.ts | 2 +- .../organization-switcher.component.html | 2 +- .../components/organization-filter.component.html | 6 +++--- src/app/oss-routing.module.ts | 10 +++++----- .../settings/create-organization.component.html | 14 ++++++++++---- src/app/vault/share.component.html | 2 +- 7 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/app/accounts/login.component.ts b/src/app/accounts/login.component.ts index 21a1f6d0..524137a6 100644 --- a/src/app/accounts/login.component.ts +++ b/src/app/accounts/login.component.ts @@ -74,7 +74,7 @@ export class LoginComponent extends BaseLoginComponent { if (qParams.premium != null) { this.routerService.setPreviousUrl("/settings/premium"); } else if (qParams.org != null) { - const route = this.router.createUrlTree(["settings/create-organization"], { + const route = this.router.createUrlTree(["create-organization"], { queryParams: { plan: qParams.org }, }); this.routerService.setPreviousUrl(route.toString()); diff --git a/src/app/accounts/register.component.ts b/src/app/accounts/register.component.ts index fd2f3b56..542bb8e3 100644 --- a/src/app/accounts/register.component.ts +++ b/src/app/accounts/register.component.ts @@ -71,7 +71,7 @@ export class RegisterComponent extends BaseRegisterComponent { } else if (qParams.org != null) { this.showCreateOrgMessage = true; this.referenceData.flow = qParams.org; - const route = this.router.createUrlTree(["settings/create-organization"], { + const route = this.router.createUrlTree(["create-organization"], { queryParams: { plan: qParams.org }, }); this.routerService.setPreviousUrl(route.toString()); diff --git a/src/app/components/organization-switcher.component.html b/src/app/components/organization-switcher.component.html index 69bf5e59..7975fd9e 100644 --- a/src/app/components/organization-switcher.component.html +++ b/src/app/components/organization-switcher.component.html @@ -58,7 +58,7 @@
  • - + {{ "newOrganization" | i18n }} diff --git a/src/app/modules/vault-filter/components/organization-filter.component.html b/src/app/modules/vault-filter/components/organization-filter.component.html index 90c28359..23e3508e 100644 --- a/src/app/modules/vault-filter/components/organization-filter.component.html +++ b/src/app/modules/vault-filter/components/organization-filter.component.html @@ -12,7 +12,7 @@
  • - + {{ "newOrganization" | i18n }} @@ -47,7 +47,7 @@ @@ -112,7 +112,7 @@ diff --git a/src/app/oss-routing.module.ts b/src/app/oss-routing.module.ts index 0eea2fd3..72faa67b 100644 --- a/src/app/oss-routing.module.ts +++ b/src/app/oss-routing.module.ts @@ -155,6 +155,11 @@ const routes: Routes = [ .IndividualVaultModule, }, { path: "sends", component: SendComponent, data: { title: "Send" } }, + { + path: "create-organization", + component: CreateOrganizationComponent, + data: { titleId: "newOrganization" }, + }, { path: "settings", component: SettingsComponent, @@ -181,11 +186,6 @@ const routes: Routes = [ loadChildren: async () => (await import("./settings/subscription-routing.module")).SubscriptionRoutingModule, }, - { - path: "create-organization", - component: CreateOrganizationComponent, - data: { titleId: "newOrganization" }, - }, { path: "emergency-access", children: [ diff --git a/src/app/settings/create-organization.component.html b/src/app/settings/create-organization.component.html index 815442fe..f5b4219a 100644 --- a/src/app/settings/create-organization.component.html +++ b/src/app/settings/create-organization.component.html @@ -1,5 +1,11 @@ - From 74bdfe260222755368647a9ee401c089f3de502e Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Thu, 12 May 2022 09:12:02 +1000 Subject: [PATCH 07/45] Fix permission checking when accessing manage SSO (#1663) --- .../src/app/organizations/organizations-routing.module.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bitwarden_license/src/app/organizations/organizations-routing.module.ts b/bitwarden_license/src/app/organizations/organizations-routing.module.ts index 7ce7f56c..c300da14 100644 --- a/bitwarden_license/src/app/organizations/organizations-routing.module.ts +++ b/bitwarden_license/src/app/organizations/organizations-routing.module.ts @@ -22,9 +22,9 @@ const routes: Routes = [ component: ManageComponent, canActivate: [PermissionsGuard], data: { - permissions: [ - NavigationPermissionsService.getPermissions("manage").concat(Permissions.ManageSso), - ], + permissions: NavigationPermissionsService.getPermissions("manage").concat( + Permissions.ManageSso + ), }, children: [ { From e3e7fce70a48fc2e9589e45cc662657bfcae503c Mon Sep 17 00:00:00 2001 From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Date: Thu, 12 May 2022 08:43:27 -0400 Subject: [PATCH 08/45] [bug:euvr] Self-hosted instance hiding subscription nav item (#1669) --- src/app/settings/settings.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/settings/settings.component.ts b/src/app/settings/settings.component.ts index 8b806ab6..9756ba41 100644 --- a/src/app/settings/settings.component.ts +++ b/src/app/settings/settings.component.ts @@ -54,7 +54,11 @@ export class SettingsComponent implements OnInit, OnDestroy { this.premium = await this.tokenService.getPremium(); this.hasFamilySponsorshipAvailable = await this.organizationService.canManageSponsorships(); const hasPremiumFromOrg = await this.stateService.getCanAccessPremium(); - const billing = await this.apiService.getUserBillingHistory(); - this.hideSubscription = !this.premium && hasPremiumFromOrg && billing.hasNoHistory; + let billing = null; + if (!this.selfHosted) { + billing = await this.apiService.getUserBillingHistory(); + } + this.hideSubscription = + !this.premium && hasPremiumFromOrg && (this.selfHosted || billing?.hasNoHistory); } } From 3367736c7e18992748853e4c57350143ca98dd13 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Thu, 12 May 2022 15:47:18 +0200 Subject: [PATCH 09/45] [SG-267] Exposed passwords report: console error (#1671) --- .../tools/exposed-passwords-report.component.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/organizations/tools/exposed-passwords-report.component.ts b/src/app/organizations/tools/exposed-passwords-report.component.ts index 1a860864..e3b8f552 100644 --- a/src/app/organizations/tools/exposed-passwords-report.component.ts +++ b/src/app/organizations/tools/exposed-passwords-report.component.ts @@ -14,7 +14,7 @@ import { CipherView } from "jslib-common/models/view/cipherView"; import { ExposedPasswordsReportComponent as BaseExposedPasswordsReportComponent } from "../../reports/exposed-passwords-report.component"; @Component({ - selector: "app-exposed-passwords-report", + selector: "app-org-exposed-passwords-report", templateUrl: "../../reports/exposed-passwords-report.component.html", }) export class ExposedPasswordsReportComponent extends BaseExposedPasswordsReportComponent { @@ -41,12 +41,10 @@ export class ExposedPasswordsReportComponent extends BaseExposedPasswordsReportC } ngOnInit() { - const dynamicSuper = Object.getPrototypeOf(this.constructor.prototype); this.route.parent.parent.params.subscribe(async (params) => { this.organization = await this.organizationService.get(params.organizationId); this.manageableCiphers = await this.cipherService.getAll(); - // TODO: We should do something about this, calling super in an async function is bad - dynamicSuper.ngOnInit(); + await this.checkAccess(); }); } From f4f3e8c5744c07e0bf50c30afb6dac1c6e51c962 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Thu, 12 May 2022 16:21:50 +0200 Subject: [PATCH 10/45] [SG-279] Fix unlock button not working after logging in through SSO (#1672) --- src/app/accounts/lock.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/accounts/lock.component.ts b/src/app/accounts/lock.component.ts index 4b8a0d4b..79148100 100644 --- a/src/app/accounts/lock.component.ts +++ b/src/app/accounts/lock.component.ts @@ -55,7 +55,7 @@ export class LockComponent extends BaseLockComponent { await super.ngOnInit(); this.onSuccessfulSubmit = async () => { const previousUrl = this.routerService.getPreviousUrl(); - if (previousUrl !== "/" && previousUrl.indexOf("lock") === -1) { + if (previousUrl && previousUrl !== "/" && previousUrl.indexOf("lock") === -1) { this.successRoute = previousUrl; } this.router.navigateByUrl(this.successRoute); From 888892b3e7afe9a93e2ee76dae23cc8db34f0d88 Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Fri, 13 May 2022 08:31:30 +1000 Subject: [PATCH 11/45] Revert accidental cnesting of org routes (#1670) --- .../layouts/organization-layout.component.html | 2 ++ src/app/oss-routing.module.ts | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/app/organizations/layouts/organization-layout.component.html b/src/app/organizations/layouts/organization-layout.component.html index cb0e6bba..3834635e 100644 --- a/src/app/organizations/layouts/organization-layout.component.html +++ b/src/app/organizations/layouts/organization-layout.component.html @@ -1,3 +1,4 @@ +
    @@ -35,3 +36,4 @@
    + diff --git a/src/app/oss-routing.module.ts b/src/app/oss-routing.module.ts index 72faa67b..77547813 100644 --- a/src/app/oss-routing.module.ts +++ b/src/app/oss-routing.module.ts @@ -229,15 +229,15 @@ const routes: Routes = [ (await import("./reports/reports-routing.module")).ReportsRoutingModule, }, { path: "setup/families-for-enterprise", component: FamiliesForEnterpriseSetupComponent }, - { - path: "organizations", - loadChildren: () => - import("./organizations/organization-routing.module").then( - (m) => m.OrganizationsRoutingModule - ), - }, ], }, + { + path: "organizations", + loadChildren: () => + import("./organizations/organization-routing.module").then( + (m) => m.OrganizationsRoutingModule + ), + }, ]; @NgModule({ From be30d470389e3b08ecdc3d8d7b446cc295591014 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Fri, 13 May 2022 15:32:15 +0200 Subject: [PATCH 12/45] [EC-200] Handle an edge case where ciphers were not selectable (#1674) --- .../organization-vault/organization-vault.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/modules/vault/modules/organization-vault/organization-vault.component.ts b/src/app/modules/vault/modules/organization-vault/organization-vault.component.ts index 318be6bc..6741ab37 100644 --- a/src/app/modules/vault/modules/organization-vault/organization-vault.component.ts +++ b/src/app/modules/vault/modules/organization-vault/organization-vault.component.ts @@ -123,7 +123,11 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy { this.route.queryParams.subscribe(async (params) => { if (params.cipherId) { - if ((await this.cipherService.get(params.cipherId)) != null) { + if ( + // Handle users with implicit collection access since they use the admin endpoint + this.organization.canEditAnyCollection || + (await this.cipherService.get(params.cipherId)) != null + ) { this.editCipherId(params.cipherId); } else { this.platformUtilsService.showToast( From 5d1522b77a803f7a17eef56cf5bd054b884f8452 Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Fri, 13 May 2022 15:14:27 -0400 Subject: [PATCH 13/45] [fix] Check policies when reloading organizations for filters (#1677) --- src/app/modules/vault-filter/vault-filter.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/modules/vault-filter/vault-filter.component.ts b/src/app/modules/vault-filter/vault-filter.component.ts index 9ffee922..17bd055b 100644 --- a/src/app/modules/vault-filter/vault-filter.component.ts +++ b/src/app/modules/vault-filter/vault-filter.component.ts @@ -32,6 +32,10 @@ export class VaultFilterComponent extends BaseVaultFilterComponent { // 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(); } async initCollections() { From 3501be94843c9858ee36b4a21032193824287c2a Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Fri, 13 May 2022 15:14:39 -0400 Subject: [PATCH 14/45] [fix] Add max width to vault filter buttons to keep content unified (#1678) --- src/scss/vault-filters.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scss/vault-filters.scss b/src/scss/vault-filters.scss index 552b0f75..292eff57 100644 --- a/src/scss/vault-filters.scss +++ b/src/scss/vault-filters.scss @@ -116,6 +116,7 @@ } text-decoration: none; } + max-width: 90%; } .edit-button { From ffb63a1cc73b7be9d2f65f0647bcdb2e7e49cff0 Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Fri, 13 May 2022 15:14:51 -0400 Subject: [PATCH 15/45] [fix] Various Trash filter bugs from EUVR (#1681) * [fix] Hide the Add Item button when filtering for trash * [fix] Use correct bulk actions for trash filter --- .../individual-vault.component.html | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/app/modules/vault/modules/individual-vault/individual-vault.component.html b/src/app/modules/vault/modules/individual-vault/individual-vault.component.html index e72ea801..151354e4 100644 --- a/src/app/modules/vault/modules/individual-vault/individual-vault.component.html +++ b/src/app/modules/vault/modules/individual-vault/individual-vault.component.html @@ -32,19 +32,26 @@
    - +
    - + {{ trashCleanupWarning }} Date: Fri, 13 May 2022 15:36:37 -0400 Subject: [PATCH 16/45] remove hostname from simplelogin. update jslib (#1679) --- jslib | 2 +- src/app/tools/generator.component.html | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/jslib b/jslib index 1370006f..65584c64 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 1370006f6ea310cf85a12bcbd8213f74f9552c4d +Subproject commit 65584c64966a6624dd84df6a4d0e1a7155656c97 diff --git a/src/app/tools/generator.component.html b/src/app/tools/generator.component.html index f090a99d..30f2a304 100644 --- a/src/app/tools/generator.component.html +++ b/src/app/tools/generator.component.html @@ -295,16 +295,6 @@ (blur)="saveUsernameOptions()" /> -
    - - -
    From ca35ccbd35acf7e5b5c613d9a1602f2f5448eae5 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Fri, 13 May 2022 15:52:58 -0400 Subject: [PATCH 17/45] PS-515 Fix/org users list performance (#1673) * [PS-515] Use virtual scroll to speed up long user lists WIP: this is currently showing a large blank area under the last user. Need to figure out why virtual-scroll-spacer is sized too large. * Fix cdk-virtual-scroll styling * Format csp for readability * Set Viewport height The viewport height was * Calculate viewport height from item size Virtual scroll viewports need set heights, we can emulate the old modal behavior by calculating an approximate height required by the viewport to display all items. It will not go beyond the window due to the `.modal-dialog-scrollable` class * Remove modal css changes * pr review --- src/app/modules/loose-components.module.ts | 3 - .../manage/entity-users.component.html | 94 +++++++++---------- .../manage/entity-users.component.ts | 11 +++ .../manage/organization-manage.module.ts | 13 +++ .../manage/collections.component.ts | 3 +- .../organizations/manage/groups.component.ts | 3 +- src/app/oss.module.ts | 2 + webpack.config.js | 56 ++++++++++- 8 files changed, 131 insertions(+), 54 deletions(-) rename src/app/{ => modules}/organizations/manage/entity-users.component.html (74%) rename src/app/{ => modules}/organizations/manage/entity-users.component.ts (93%) create mode 100644 src/app/modules/organizations/manage/organization-manage.module.ts diff --git a/src/app/modules/loose-components.module.ts b/src/app/modules/loose-components.module.ts index 89c0cb56..9dc1a0d0 100644 --- a/src/app/modules/loose-components.module.ts +++ b/src/app/modules/loose-components.module.ts @@ -35,7 +35,6 @@ import { BulkStatusComponent as OrgBulkStatusComponent } from "../organizations/ 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"; @@ -245,7 +244,6 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga OrgCollectionAddEditComponent, OrgCollectionsComponent, OrgEntityEventsComponent, - OrgEntityUsersComponent, OrgEventsComponent, OrgExportComponent, OrgExposedPasswordsReportComponent, @@ -406,7 +404,6 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga OrgCollectionAddEditComponent, OrgCollectionsComponent, OrgEntityEventsComponent, - OrgEntityUsersComponent, OrgEventsComponent, OrgExportComponent, OrgExposedPasswordsReportComponent, diff --git a/src/app/organizations/manage/entity-users.component.html b/src/app/modules/organizations/manage/entity-users.component.html similarity index 74% rename from src/app/organizations/manage/entity-users.component.html rename to src/app/modules/organizations/manage/entity-users.component.html index beb9ff0a..f4c157a9 100644 --- a/src/app/organizations/manage/entity-users.component.html +++ b/src/app/modules/organizations/manage/entity-users.component.html @@ -29,52 +29,52 @@ > {{ "loading" | i18n }}
    -
    • @@ -43,7 +41,7 @@ > @@ -53,7 +51,9 @@ > From 5a78853de5d7d886a0ada6b2a48bcd05878db1d0 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Thu, 19 May 2022 11:28:26 -0400 Subject: [PATCH 25/45] [PS-655] Add `Organization_SponsorshipsSynced` event type. (#1696) * Add `Organization_SponsorshipsSynced` event type. Update events display to handle events triggered by installations rather than users * Update jslib --- jslib | 2 +- src/app/common/base.events.component.ts | 5 ++++- src/app/services/event.service.ts | 3 +++ src/locales/en/messages.json | 3 +++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/jslib b/jslib index 2f548938..3cb94623 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 2f54893854da61a742f87b02ec4328f7933bfe27 +Subproject commit 3cb94623e2c6a3ac6cf6dbcd516ba23b03a7aee7 diff --git a/src/app/common/base.events.component.ts b/src/app/common/base.events.component.ts index 8fd78cce..11ad5c45 100644 --- a/src/app/common/base.events.component.ts +++ b/src/app/common/base.events.component.ts @@ -122,17 +122,20 @@ export abstract class BaseEventsComponent { const userId = r.actingUserId == null ? r.userId : r.actingUserId; const eventInfo = await this.eventService.getEventInfo(r); const user = this.getUserName(r, userId); + const userName = user != null ? user.name : this.i18nService.t("unknown"); + return new EventView({ message: eventInfo.message, humanReadableMessage: eventInfo.humanReadableMessage, appIcon: eventInfo.appIcon, appName: eventInfo.appName, userId: userId, - userName: user != null ? user.name : this.i18nService.t("unknown"), + userName: r.installationId != null ? `Installation: ${r.installationId}` : userName, userEmail: user != null ? user.email : "", date: r.date, ip: r.ipAddress, type: r.type, + installationId: r.installationId, }); }) ); diff --git a/src/app/services/event.service.ts b/src/app/services/event.service.ts index a851866b..02f50cf7 100644 --- a/src/app/services/event.service.ts +++ b/src/app/services/event.service.ts @@ -307,6 +307,9 @@ export class EventService { case EventType.Organization_DisabledKeyConnector: msg = humanReadableMsg = this.i18nService.t("disabledKeyConnector"); break; + case EventType.Organization_SponsorshipsSynced: + msg = humanReadableMsg = this.i18nService.t("sponsorshipsSynced"); + break; // Policies case EventType.Policy_Updated: { msg = this.i18nService.t("modifiedPolicyId", this.formatPolicyId(ev)); diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 4e15b6ad..bb37b09b 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -5041,6 +5041,9 @@ "message": "Last Sync", "Description": "Used as a prefix to indicate the last time a sync occured. Example \"Last sync 1968-11-16 00:00:00\"" }, + "sponsorshipsSynced": { + "message": "Self-hosted sponsorships synced." + }, "billingManagedByProvider": { "message": "Managed by $PROVIDER$", "placeholders": { From eab478da0c0eef04d25dd64b7e57457ac4f6e66e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Filipe=20da=20Silva=20Bispo?= Date: Thu, 19 May 2022 18:30:38 +0100 Subject: [PATCH 26/45] PS-502: Remove extraneous comma from web vault footer (#1697) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - removed comma from footer files Co-authored-by: André Bispo --- src/app/layouts/footer.component.html | 2 +- src/app/layouts/frontend-layout.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/layouts/footer.component.html b/src/app/layouts/footer.component.html index 8601e123..98836bfd 100644 --- a/src/app/layouts/footer.component.html +++ b/src/app/layouts/footer.component.html @@ -1,6 +1,6 @@