feat: switched to secretapproval check for license

This commit is contained in:
=
2024-05-31 00:03:27 +05:30
parent a13d4a4970
commit 41914e0027
5 changed files with 3 additions and 6 deletions

View File

@@ -16,7 +16,6 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({
environmentLimit: null,
environmentsUsed: 0,
dynamicSecret: false,
secretReplication: false,
secretVersioning: true,
pitRecovery: false,
ipAllowlisting: false,

View File

@@ -52,7 +52,6 @@ export type TFeatureSet = {
has_used_trial: true;
secretApproval: false;
secretRotation: true;
secretReplication: false;
};
export type TOrgPlansTableDTO = {

View File

@@ -86,7 +86,7 @@ export const secretImportServiceFactory = ({
);
if (isReplication) {
const plan = await licenseService.getPlan(actorOrgId);
if (!plan.secretReplication) {
if (!plan.secretApproval) {
throw new BadRequestError({
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);
if (!plan.secretReplication) {
if (!plan.secretApproval) {
throw new BadRequestError({
message: "Failed to create secret replication due to plan restriction. Upgrade plan to create replication."
});

View File

@@ -24,7 +24,6 @@ export type SubscriptionPlan = {
scim: boolean;
ldap: boolean;
groups: boolean;
secretReplication: boolean;
status:
| "incomplete"
| "incomplete_expired"

View File

@@ -69,7 +69,7 @@ export const CreateSecretImportForm = ({
isReplication
}: TFormSchema) => {
try {
if (isReplication && !subscription?.secretReplication) {
if (isReplication && !subscription?.secretApproval) {
onUpgradePlan();
return;
}