mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +01:00
[AC-1078] feat: do not block client org creating (#4899)
Single org policy shouldn't not block provider from creating client organizations
This commit is contained in:
parent
720b61076a
commit
c223567cae
@ -71,7 +71,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||||||
this.formGroup?.controls?.plan?.setValue(plan);
|
this.formGroup?.controls?.plan?.setValue(plan);
|
||||||
}
|
}
|
||||||
private _plan = PlanType.Free;
|
private _plan = PlanType.Free;
|
||||||
@Input() providerId: string;
|
@Input() providerId?: string;
|
||||||
@Output() onSuccess = new EventEmitter<OnSuccessArgs>();
|
@Output() onSuccess = new EventEmitter<OnSuccessArgs>();
|
||||||
@Output() onCanceled = new EventEmitter<void>();
|
@Output() onCanceled = new EventEmitter<void>();
|
||||||
@Output() onTrialBillingSuccess = new EventEmitter();
|
@Output() onTrialBillingSuccess = new EventEmitter();
|
||||||
@ -80,7 +80,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||||||
selfHosted = false;
|
selfHosted = false;
|
||||||
productTypes = ProductType;
|
productTypes = ProductType;
|
||||||
formPromise: Promise<string>;
|
formPromise: Promise<string>;
|
||||||
singleOrgPolicyBlock = false;
|
singleOrgPolicyAppliesToActiveUser = false;
|
||||||
isInTrialFlow = false;
|
isInTrialFlow = false;
|
||||||
discount = 0;
|
discount = 0;
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||||||
.policyAppliesToActiveUser$(PolicyType.SingleOrg)
|
.policyAppliesToActiveUser$(PolicyType.SingleOrg)
|
||||||
.pipe(takeUntil(this.destroy$))
|
.pipe(takeUntil(this.destroy$))
|
||||||
.subscribe((policyAppliesToActiveUser) => {
|
.subscribe((policyAppliesToActiveUser) => {
|
||||||
this.singleOrgPolicyBlock = policyAppliesToActiveUser;
|
this.singleOrgPolicyAppliesToActiveUser = policyAppliesToActiveUser;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -157,6 +157,10 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||||||
this.destroy$.complete();
|
this.destroy$.complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get singleOrgPolicyBlock() {
|
||||||
|
return this.singleOrgPolicyAppliesToActiveUser && this.providerId == null;
|
||||||
|
}
|
||||||
|
|
||||||
get createOrganization() {
|
get createOrganization() {
|
||||||
return this.organizationId == null;
|
return this.organizationId == null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user