From cd6868feee36ec0f92d2a562ec7b6a7aaafa8a3a Mon Sep 17 00:00:00 2001 From: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> Date: Tue, 16 May 2023 10:35:57 -0500 Subject: [PATCH] Hide +New Project on secret edit (#5370) --- .../secrets/dialog/secret-dialog.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-dialog.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-dialog.component.ts index 0e374719708..64b75511ff4 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-dialog.component.ts @@ -68,6 +68,9 @@ export class SecretDialogComponent implements OnInit { throw new Error(`The secret dialog was not called with the appropriate operation values.`); } else if (this.data.operation == OperationType.Add) { await this.loadProjects(true); + if (this.data.projectId == null || this.data.projectId == "") { + this.addNewProjectOptionToProjectsDropDown(); + } } if (this.data.projectId) { @@ -78,10 +81,6 @@ export class SecretDialogComponent implements OnInit { this.formGroup.get("project").removeValidators(Validators.required); this.formGroup.get("project").updateValueAndValidity(); } - - if (this.data.projectId == null || this.data.projectId == "") { - this.addNewProjectOptionToProjectsDropDown(); - } } async loadData() {