feat: completed new role service

This commit is contained in:
=
2025-10-09 23:58:09 +05:30
parent c6cab7a528
commit a846831b26
7 changed files with 512 additions and 1 deletions
@@ -2,7 +2,7 @@ import { MongoAbility } from "@casl/ability";
import { MongoQuery } from "@ucast/mongo2js";
import { Knex } from "knex";
import { ActionProjectType, TMemberships } from "@app/db/schemas";
import { AccessScope, AccessScopeData, ActionProjectType, TMemberships } from "@app/db/schemas";
import { ActorAuthMethod, ActorType } from "@app/services/auth/auth-type";
import { OrgPermissionSet } from "./org-permission";
@@ -49,6 +49,14 @@ export type TGetProjectPermissionArg = {
actionProjectType: ActionProjectType;
};
export type TGetOrgPermissionArg = {
actor: ActorType;
actorId: string;
orgId: string;
actorAuthMethod: ActorAuthMethod;
actorOrgId?: string;
};
export type TPermissionServiceFactory = {
getOrgPermission: (
type: ActorType,