feat: switched to secretapproval check for license

This commit is contained in:
=
2024-05-31 23:10:04 +05:30
parent a13d4a4970
commit 41914e0027
5 changed files with 3 additions and 6 deletions
@@ -16,7 +16,6 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({
environmentLimit: null, environmentLimit: null,
environmentsUsed: 0, environmentsUsed: 0,
dynamicSecret: false, dynamicSecret: false,
secretReplication: false,
secretVersioning: true, secretVersioning: true,
pitRecovery: false, pitRecovery: false,
ipAllowlisting: false, ipAllowlisting: false,
@@ -52,7 +52,6 @@ export type TFeatureSet = {
has_used_trial: true; has_used_trial: true;
secretApproval: false; secretApproval: false;
secretRotation: true; secretRotation: true;
secretReplication: false;
}; };
export type TOrgPlansTableDTO = { export type TOrgPlansTableDTO = {
@@ -86,7 +86,7 @@ export const secretImportServiceFactory = ({
); );
if (isReplication) { if (isReplication) {
const plan = await licenseService.getPlan(actorOrgId); const plan = await licenseService.getPlan(actorOrgId);
if (!plan.secretReplication) { if (!plan.secretApproval) {
throw new BadRequestError({ throw new BadRequestError({
message: "Failed to create secret replication due to plan restriction. Upgrade plan to create replication." message: "Failed to create secret replication due to plan restriction. Upgrade plan to create replication."
}); });
@@ -338,7 +338,7 @@ export const secretImportServiceFactory = ({
); );
const plan = await licenseService.getPlan(actorOrgId); const plan = await licenseService.getPlan(actorOrgId);
if (!plan.secretReplication) { if (!plan.secretApproval) {
throw new BadRequestError({ throw new BadRequestError({
message: "Failed to create secret replication due to plan restriction. Upgrade plan to create replication." message: "Failed to create secret replication due to plan restriction. Upgrade plan to create replication."
}); });
@@ -24,7 +24,6 @@ export type SubscriptionPlan = {
scim: boolean; scim: boolean;
ldap: boolean; ldap: boolean;
groups: boolean; groups: boolean;
secretReplication: boolean;
status: status:
| "incomplete" | "incomplete"
| "incomplete_expired" | "incomplete_expired"
@@ -69,7 +69,7 @@ export const CreateSecretImportForm = ({
isReplication isReplication
}: TFormSchema) => { }: TFormSchema) => {
try { try {
if (isReplication && !subscription?.secretReplication) { if (isReplication && !subscription?.secretApproval) {
onUpgradePlan(); onUpgradePlan();
return; return;
} }