Browse Source

Hide +New Project on secret edit (#5370)

pull/5461/head
Thomas Avery 3 years ago committed by GitHub
parent
commit
cd6868feee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-dialog.component.ts

7
bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-dialog.component.ts

@ -68,6 +68,9 @@ export class SecretDialogComponent implements OnInit { @@ -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 { @@ -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() {

Loading…
Cancel
Save