feat(rbac): role-based access control module (#14310)
This commit is contained in:
@@ -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",
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user