[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 -->
|
||||
<div class="tw-my-10">
|
||||
<sm-subscribe
|
||||
*ngIf="planOffersSecretsManager"
|
||||
*ngIf="planOffersSecretsManager && !hasProvider"
|
||||
[formGroup]="formGroup.controls.secretsManager"
|
||||
[selectedPlan]="selectedSecretsManagerPlan"
|
||||
[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.changedOwnedBusiness();
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
get singleOrgPolicyBlock() {
|
||||
return this.singleOrgPolicyAppliesToActiveUser && this.providerId == null;
|
||||
return this.singleOrgPolicyAppliesToActiveUser && !this.hasProvider;
|
||||
}
|
||||
|
||||
get createOrganization() {
|
||||
|
@ -235,6 +235,10 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||
);
|
||||
}
|
||||
|
||||
get hasProvider() {
|
||||
return this.providerId != null;
|
||||
}
|
||||
|
||||
additionalStoragePriceMonthly(selectedPlan: PlanResponse) {
|
||||
if (!selectedPlan.isAnnual) {
|
||||
return selectedPlan.additionalStoragePricePerGb;
|
||||
|
@ -540,7 +544,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||
// Secrets Manager
|
||||
this.buildSecretsManagerRequest(request);
|
||||
|
||||
if (this.providerId) {
|
||||
if (this.hasProvider) {
|
||||
const providerRequest = new ProviderOrganizationCreateRequest(
|
||||
this.formGroup.controls.clientOwnerEmail.value,
|
||||
request
|
||||
|
|
|
@ -115,6 +115,7 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
|||
|
||||
this.showSecretsManagerSubscribe =
|
||||
this.userOrg.canEditSubscription &&
|
||||
!this.userOrg.hasProvider &&
|
||||
!this.userOrg.useSecretsManager &&
|
||||
!this.subscription?.cancelled &&
|
||||
!this.subscriptionMarkedForCancel;
|
||||
|
|
Loading…
Reference in New Issue