mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 14:27:30 +00:00
On Cloud instances, update the number of seats if there is any discrepancy when the plan is fetched
This commit is contained in:
@@ -214,6 +214,13 @@ export const licenseServiceFactory = ({
|
|||||||
const identityUsed = await licenseDAL.countOrgUsersAndIdentities(orgId);
|
const identityUsed = await licenseDAL.countOrgUsersAndIdentities(orgId);
|
||||||
currentPlan.identitiesUsed = identityUsed;
|
currentPlan.identitiesUsed = identityUsed;
|
||||||
|
|
||||||
|
if (currentPlan.identityLimit !== null && currentPlan.identityLimit !== identityUsed) {
|
||||||
|
await licenseServerCloudApi.request.patch(`/api/license-server/v1/customers/${org.customerId}/cloud-plan`, {
|
||||||
|
quantity: membersUsed,
|
||||||
|
quantityIdentities: identityUsed
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
await keyStore.setItemWithExpiry(
|
await keyStore.setItemWithExpiry(
|
||||||
FEATURE_CACHE_KEY(org.id),
|
FEATURE_CACHE_KEY(org.id),
|
||||||
LICENSE_SERVER_CLOUD_PLAN_TTL,
|
LICENSE_SERVER_CLOUD_PLAN_TTL,
|
||||||
|
|||||||
Reference in New Issue
Block a user