mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-02 18:17:46 +01:00
[AC-1638] Disallow Secrets Manager for MSP-managed organizations (#6392)
* Hide Add SM component on sub page for MSPs * Hide Add SM component on create org page for MSPs * Use hasProvider instead of providerType
This commit is contained in:
parent
84bafe5e73
commit
a6b725d08a
@ -276,7 +276,7 @@
|
|||||||
<!-- Secrets Manager -->
|
<!-- Secrets Manager -->
|
||||||
<div class="tw-my-10">
|
<div class="tw-my-10">
|
||||||
<sm-subscribe
|
<sm-subscribe
|
||||||
*ngIf="planOffersSecretsManager"
|
*ngIf="planOffersSecretsManager && !hasProvider"
|
||||||
[formGroup]="formGroup.controls.secretsManager"
|
[formGroup]="formGroup.controls.secretsManager"
|
||||||
[selectedPlan]="selectedSecretsManagerPlan"
|
[selectedPlan]="selectedSecretsManagerPlan"
|
||||||
[upgradeOrganization]="!createOrganization"
|
[upgradeOrganization]="!createOrganization"
|
||||||
|
@ -148,7 +148,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.providerId) {
|
if (this.hasProvider) {
|
||||||
this.formGroup.controls.businessOwned.setValue(true);
|
this.formGroup.controls.businessOwned.setValue(true);
|
||||||
this.changedOwnedBusiness();
|
this.changedOwnedBusiness();
|
||||||
}
|
}
|
||||||
@ -176,7 +176,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get singleOrgPolicyBlock() {
|
get singleOrgPolicyBlock() {
|
||||||
return this.singleOrgPolicyAppliesToActiveUser && this.providerId == null;
|
return this.singleOrgPolicyAppliesToActiveUser && !this.hasProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
get createOrganization() {
|
get createOrganization() {
|
||||||
@ -235,6 +235,10 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get hasProvider() {
|
||||||
|
return this.providerId != null;
|
||||||
|
}
|
||||||
|
|
||||||
additionalStoragePriceMonthly(selectedPlan: PlanResponse) {
|
additionalStoragePriceMonthly(selectedPlan: PlanResponse) {
|
||||||
if (!selectedPlan.isAnnual) {
|
if (!selectedPlan.isAnnual) {
|
||||||
return selectedPlan.additionalStoragePricePerGb;
|
return selectedPlan.additionalStoragePricePerGb;
|
||||||
@ -540,7 +544,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||||||
// Secrets Manager
|
// Secrets Manager
|
||||||
this.buildSecretsManagerRequest(request);
|
this.buildSecretsManagerRequest(request);
|
||||||
|
|
||||||
if (this.providerId) {
|
if (this.hasProvider) {
|
||||||
const providerRequest = new ProviderOrganizationCreateRequest(
|
const providerRequest = new ProviderOrganizationCreateRequest(
|
||||||
this.formGroup.controls.clientOwnerEmail.value,
|
this.formGroup.controls.clientOwnerEmail.value,
|
||||||
request
|
request
|
||||||
|
@ -115,6 +115,7 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
|||||||
|
|
||||||
this.showSecretsManagerSubscribe =
|
this.showSecretsManagerSubscribe =
|
||||||
this.userOrg.canEditSubscription &&
|
this.userOrg.canEditSubscription &&
|
||||||
|
!this.userOrg.hasProvider &&
|
||||||
!this.userOrg.useSecretsManager &&
|
!this.userOrg.useSecretsManager &&
|
||||||
!this.subscription?.cancelled &&
|
!this.subscription?.cancelled &&
|
||||||
!this.subscriptionMarkedForCancel;
|
!this.subscriptionMarkedForCancel;
|
||||||
|
Loading…
Reference in New Issue
Block a user