Skip to content

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

Fix lint issues

Tuan Dangf2e5f1bb1062
diff --git a/backend/src/ee/services/group/group-types.ts b/backend/src/ee/services/group/group-types.ts
index 02486e0148..d465416f58 100644
--- a/backend/src/ee/services/group/group-types.ts
+++ b/backend/src/ee/services/group/group-types.ts
@@ -1,10 +1,10 @@
-import { TOrgPermission } from "@app/lib/types";
+import { TGenericPermission } from "@app/lib/types";
export type TCreateGroupDTO = {
name: string;
slug?: string;
role: string;
-} & TOrgPermission;
+} & TGenericPermission;
export type TUpdateGroupDTO = {
currentSlug: string;
@@ -13,22 +13,22 @@ export type TUpdateGroupDTO = {
slug: string;
role: string;
}> &
- TOrgPermission;
+ TGenericPermission;
export type TDeleteGroupDTO = {
groupSlug: string;
-} & TOrgPermission;
+} & TGenericPermission;
export type TGetGroupUserMembershipsDTO = {
groupSlug: string;
-} & TOrgPermission;
+} & TGenericPermission;
export type TCreateGroupUserMembershipDTO = {
groupSlug: string;
username: string;
-} & TOrgPermission;
+} & TGenericPermission;
export type TDeleteGroupUserMembershipDTO = {
groupSlug: string;
username: string;
-} & TOrgPermission;
+} & TGenericPermission;
diff --git a/backend/src/lib/types/index.ts b/backend/src/lib/types/index.ts
index 25a7e64657..b3b46e7398 100644
--- a/backend/src/lib/types/index.ts
+++ b/backend/src/lib/types/index.ts
@@ -1,8 +1,21 @@
import { ActorAuthMethod, ActorType } from "@app/services/auth/auth-type";
+export type TGenericPermission = {
+ actor: ActorType;
+ actorId: string;
+ actorAuthMethod: ActorAuthMethod;
+ actorOrgId: string | undefined;
+};
+
+/**
+ * TODO(dangtony98): ideally move service fns to use TGenericPermission
+ * because TOrgPermission [orgId] is not as relevant anymore with the
+ * introduction of organizationIds bound to all user tokens
+ */
export type TOrgPermission = {
actor: ActorType;
actorId: string;
+ orgId: string;
actorAuthMethod: ActorAuthMethod;
actorOrgId: string | undefined;
};