feat(rbac): role-based access control module (#14310)

This commit is contained in:
Carlos R. L. Rodrigues
2026-01-07 05:36:39 -03:00
committed by GitHub
parent d6d7d14a6a
commit 1bfde8dc57
74 changed files with 4186 additions and 3 deletions
@@ -29,6 +29,7 @@ export const Modules = {
SETTINGS: "settings",
CACHING: "caching",
TRANSLATION: "translation",
RBAC: "rbac",
} as const
export const MODULE_PACKAGE_NAMES = {
@@ -62,6 +63,7 @@ export const MODULE_PACKAGE_NAMES = {
[Modules.SETTINGS]: "@medusajs/medusa/settings",
[Modules.CACHING]: "@medusajs/caching",
[Modules.TRANSLATION]: "@medusajs/translation",
[Modules.RBAC]: "@medusajs/medusa/rbac",
}
export const REVERSED_MODULE_PACKAGE_NAMES = Object.entries(
@@ -1,10 +1,10 @@
import { join } from "path"
import { Modules } from "./definition"
import type { LoadedModule } from "@medusajs/types"
import { join } from "path"
import { FileSystem } from "../common/file-system"
import { toUnixSlash } from "../common/to-unix-slash"
import { toCamelCase } from "../common/to-camel-case"
import { toUnixSlash } from "../common/to-unix-slash"
import { upperCaseFirst } from "../common/upper-case-first"
import { Modules } from "./definition"
/**
* For known services that has interfaces, we will set the container
@@ -37,6 +37,10 @@ const SERVICES_INTERFACES = {
[Modules.FILE]: "IFileModuleService",
[Modules.NOTIFICATION]: "INotificationModuleService",
[Modules.LOCKING]: "ILockingModule",
[Modules.SETTINGS]: "ISettingsModuleService",
[Modules.CACHING]: "ICachingModuleService",
[Modules.TRANSLATION]: "ITranslationModuleService",
[Modules.RBAC]: "IRbacModuleService",
}
/**