Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

add no access to org service role

Maidul Islamcfb0d4ee96da
diff --git a/backend-pg/src/services/org/org-role-service.ts b/backend-pg/src/services/org/org-role-service.ts
index 98515515ae..8dfd0e0af7 100644
--- a/backend-pg/src/services/org/org-role-service.ts
+++ b/backend-pg/src/services/org/org-role-service.ts
@@ -5,6 +5,7 @@ import { TOrgRolesInsert, TOrgRolesUpdate } from "@app/db/schemas";
import {
orgAdminPermissions,
orgMemberPermissions,
+ orgNoAccessPermissions,
OrgPermissionActions,
OrgPermissionSubjects
} from "@app/ee/services/permission/org-permission";
@@ -108,6 +109,16 @@ export const orgRoleServiceFactory = ({
createdAt: new Date(),
updatedAt: new Date()
},
+ {
+ id: "b10d49a9-09a9-4443-916a-4246f9ff2c72", // dummy user for zod validation in response
+ orgId,
+ name: "No Access",
+ slug: "no-access",
+ description: "No access to any resources in the organization",
+ permissions: packRules(orgNoAccessPermissions.rules),
+ createdAt: new Date(),
+ updatedAt: new Date()
+ },
...(customRoles || []).map(({ permissions, ...data }) => ({
...data,
permissions