Skip to content

Commit

Permalink
Merge branch 'main' into PM-14219-new-verification-state-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Jingo88 committed Nov 14, 2024
2 parents b5d93e0 + d4a381e commit 535f7d9
Show file tree
Hide file tree
Showing 26 changed files with 46 additions and 35 deletions.
6 changes: 4 additions & 2 deletions apps/desktop/src/platform/services/ssh-agent.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { DesktopSettingsService } from "./desktop-settings.service";
})
export class SshAgentService implements OnDestroy {
SSH_REFRESH_INTERVAL = 1000;
SSH_VAULT_UNLOCK_REQUEST_TIMEOUT = 1000 * 60;
SSH_VAULT_UNLOCK_REQUEST_TIMEOUT = 60_000;
SSH_REQUEST_UNLOCK_POLLING_INTERVAL = 100;

private destroy$ = new Subject<void>();
Expand Down Expand Up @@ -79,7 +79,9 @@ export class SshAgentService implements OnDestroy {
});
return this.authService.activeAccountStatus$.pipe(
filter((status) => status === AuthenticationStatus.Unlocked),
timeout(this.SSH_VAULT_UNLOCK_REQUEST_TIMEOUT),
timeout({
first: this.SSH_VAULT_UNLOCK_REQUEST_TIMEOUT,
}),
catchError((error: unknown) => {
if (error instanceof TimeoutError) {
this.toastService.showToast({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
<app-side-nav variant="secondary" *ngIf="organization$ | async as organization">
<bit-nav-logo [openIcon]="logo" route="." [label]="'adminConsole' | i18n"></bit-nav-logo>
<org-switcher [filter]="orgFilter" [hideNewButton]="hideNewOrgButton$ | async"></org-switcher>

<bit-nav-group
icon="bwi-filter"
*ngIf="isAccessIntelligenceFeatureEnabled"
[text]="'accessIntelligence' | i18n"
>
<bit-nav-item
[text]="'riskInsights' | i18n"
route="access-intelligence/risk-insights"
></bit-nav-item>
</bit-nav-group>
<bit-nav-item
icon="bwi-collection"
[text]="'collections' | i18n"
Expand Down Expand Up @@ -39,11 +48,6 @@
*ngIf="organization.canAccessReports"
></bit-nav-item>
</bit-nav-group>
<bit-nav-item
*ngIf="isRiskInsightsFeatureEnabled"
[text]="'riskInsights' | i18n"
route="risk-insights"
></bit-nav-item>
<bit-nav-group
icon="bwi-billing"
[text]="'billing' | i18n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class OrganizationLayoutComponent implements OnInit, OnDestroy {
showPaymentAndHistory$: Observable<boolean>;
hideNewOrgButton$: Observable<boolean>;
organizationIsUnmanaged$: Observable<boolean>;
isRiskInsightsFeatureEnabled = false;
isAccessIntelligenceFeatureEnabled = false;

private _destroy = new Subject<void>();

Expand All @@ -67,7 +67,7 @@ export class OrganizationLayoutComponent implements OnInit, OnDestroy {
async ngOnInit() {
document.body.classList.remove("layout_frontend");

this.isRiskInsightsFeatureEnabled = await this.configService.getFeatureFlag(
this.isAccessIntelligenceFeatureEnabled = await this.configService.getFeatureFlag(
FeatureFlag.AccessIntelligence,
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ const routes: Routes = [
),
},
{
path: "risk-insights",
path: "access-intelligence",
loadChildren: () =>
import("../../tools/risk-insights/risk-insights.module").then(
(m) => m.RiskInsightsModule,
import("../../tools/access-intelligence/access-intelligence.module").then(
(m) => m.AccessIntelligenceModule,
),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { RiskInsightsComponent } from "./risk-insights.component";

const routes: Routes = [
{
path: "",
component: RiskInsightsComponent,
path: "risk-insights",
canActivate: [canAccessFeature(FeatureFlag.AccessIntelligence)],
component: RiskInsightsComponent,
data: {
titleId: "RiskInsights",
},
Expand All @@ -21,4 +21,4 @@ const routes: Routes = [
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class RiskInsightsRoutingModule {}
export class AccessIntelligenceRoutingModule {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { NgModule } from "@angular/core";

import { AccessIntelligenceRoutingModule } from "./access-intelligence-routing.module";
import { RiskInsightsComponent } from "./risk-insights.component";

@NgModule({
imports: [RiskInsightsComponent, AccessIntelligenceRoutingModule],
})
export class AccessIntelligenceModule {}
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<div class="tw-mb-1 text-primary" bitTypography="body1">{{ "riskInsights" | i18n }}</div>
<h1 bitTypography="h1">{{ "passwordRisk" | i18n }}</h1>
<div class="tw-text-muted">{{ "discoverAtRiskPasswords" | i18n }}</div>
<div class="tw-bg-primary-100 tw-rounded-lg tw-w-full tw-px-8 tw-py-2 tw-my-4">
<div class="tw-mb-1 text-primary" bitTypography="body1">{{ "accessIntelligence" | i18n }}</div>
<h1 bitTypography="h1">{{ "riskInsights" | i18n }}</h1>
<div class="tw-text-muted tw-max-w-4xl tw-mb-2">
{{ "reviewAtRiskPasswords" | i18n }}
&nbsp;<a class="text-primary" routerLink="/login">{{ "learnMore" | i18n }}</a>
</div>
<div *ngIf="apps.length" class="tw-bg-primary-100 tw-rounded-lg tw-w-full tw-px-8 tw-py-2 tw-my-4">
<i class="bwi bwi-exclamation-triangle bwi-lg tw-text-[1.2rem] text-muted" aria-hidden="true"></i>
<span class="tw-mx-4">{{
"dataLastUpdated" | i18n: (dataLastUpdated | date: "MMMM d, y 'at' h:mm a")
Expand Down
9 changes: 0 additions & 9 deletions apps/web/src/app/tools/risk-insights/risk-insights.module.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -466,12 +466,11 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy {
* Helper method to delete cipher.
*/
private async deleteCipher(): Promise<void> {
const cipherIsUnassigned =
!this.cipher.collectionIds || this.cipher.collectionIds?.length === 0;
const cipherIsUnassigned = this.cipher.isUnassigned;

// Delete the cipher as an admin when:
// - the organization allows for owners/admins to manage all collections/items
// - the cipher is unassigned
// - The organization allows for owners/admins to manage all collections/items
// - The cipher is unassigned
const asAdmin = this.organization?.canEditAllCiphers || cipherIsUnassigned;

if (this.cipher.isDeleted) {
Expand Down
7 changes: 5 additions & 2 deletions apps/web/src/locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@
"criticalApplications": {
"message": "Critical applications"
},
"accessIntelligence": {
"message": "Access Intelligence"
},
"riskInsights": {
"message": "Risk Insights"
},
"passwordRisk": {
"message": "Password Risk"
},
"discoverAtRiskPasswords": {
"message": "Discover at-risk passwords and notify users to change those passwords."
"reviewAtRiskPasswords": {
"message": "Review at-risk passwords (weak, exposed, or reused) across applications. Select your most critical applications to prioritize security actions for your users to address at-risk passwords."
},
"dataLastUpdated": {
"message": "Data last updated: $DATE$",
Expand Down

0 comments on commit 535f7d9

Please sign in to comment.