1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-03-02 03:41:09 +01:00

fix: refactor enabled state of org name field, refs PM-14533 (#11879)

This commit is contained in:
Vincent Salucci 2024-11-06 10:12:24 -06:00 committed by GitHub
parent d5139e0511
commit dce8c0a61a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,20 +123,22 @@ export class AccountComponent implements OnInit, OnDestroy {
this.canEditSubscription = organization.canEditSubscription; this.canEditSubscription = organization.canEditSubscription;
this.canUseApi = organization.useApi; this.canUseApi = organization.useApi;
// Update disabled states - reactive forms prefers not using disabled attribute
// Disabling these fields for self hosted orgs is deprecated // Disabling these fields for self hosted orgs is deprecated
// This block can be completely removed as part of // This block can be completely removed as part of
// https://bitwarden.atlassian.net/browse/PM-10863 // https://bitwarden.atlassian.net/browse/PM-10863
if (!this.limitCollectionCreationDeletionSplitFeatureFlagIsEnabled) { if (!this.limitCollectionCreationDeletionSplitFeatureFlagIsEnabled) {
if (!this.selfHosted) { if (!this.selfHosted) {
this.formGroup.get("orgName").enable();
this.collectionManagementFormGroup.get("limitCollectionCreationDeletion").enable(); this.collectionManagementFormGroup.get("limitCollectionCreationDeletion").enable();
this.collectionManagementFormGroup.get("allowAdminAccessToAllCollectionItems").enable(); this.collectionManagementFormGroup.get("allowAdminAccessToAllCollectionItems").enable();
} }
} }
if (!this.selfHosted && this.canEditSubscription) { // Update disabled states - reactive forms prefers not using disabled attribute
this.formGroup.get("billingEmail").enable(); if (!this.selfHosted) {
this.formGroup.get("orgName").enable();
if (this.canEditSubscription) {
this.formGroup.get("billingEmail").enable();
}
} }
// Org Response // Org Response