Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
improvement: make limit conditional
Scott Wilson93f27a7ee8e3
diff --git a/backend/src/services/identity-project/identity-project-dal.ts b/backend/src/services/identity-project/identity-project-dal.tsindex 3a73244a44..3e7ca7946f 100644--- a/backend/src/services/identity-project/identity-project-dal.ts+++ b/backend/src/services/identity-project/identity-project-dal.ts@@ -131,8 +131,6 @@ export const identityProjectDALFactory = (db: TDbClient) => {`${TableName.Identity}.id`).where(`${TableName.IdentityProjectMembership}.projectId`, projectId)- .offset(filter.offset ?? 0)- .limit(filter.limit ?? 100).orderBy(`${TableName.Identity}.${filter.orderBy ?? ProjectIdentityOrderBy.Name}`,filter.orderDirection ?? OrderByDirection.ASC@@ -140,6 +138,10 @@ export const identityProjectDALFactory = (db: TDbClient) => {.select(selectAllTableCols(TableName.Identity)).as(TableName.Identity); // required for subqueries+ if (filter.limit) {+ void fetchIdentitySubquery.offset(filter.offset ?? 0).limit(filter.limit);+ }+const query = (tx || db.replicaNode())(TableName.IdentityProjectMembership).where(`${TableName.IdentityProjectMembership}.projectId`, projectId).join(TableName.Project, `${TableName.IdentityProjectMembership}.projectId`, `${TableName.Project}.id`)