1 # Medusa Enterprise Edition License
2
3 Copyright (c) MedusaJS, Inc. All rights reserved.
4
5 ## Commercial license required
6
7 The Enterprise Edition materials identified below (the "Enterprise
8 Materials") are proprietary software. They are not licensed under the MIT
9 License that applies to the remainder of this repository.
10
11 You may use, reproduce, modify, distribute, or otherwise exploit the
12 Enterprise Materials only under a separate, valid commercial agreement with
13 MedusaJS, Inc. that expressly grants those rights. Possession of or access to
14 the source code does not grant a license. If you do not have such an
15 agreement, no rights are granted except those that cannot lawfully be
16 restricted.
17
18 The terms of an applicable commercial agreement control if they conflict with
19 this notice. To obtain a commercial license, contact MedusaJS, Inc. at
20 https://medusajs.com/contact.
21
22 This notice applies prospectively and does not withdraw rights already granted
23 for earlier versions of any material under the MIT License. Those earlier
24 versions remain available under their original license terms.
25
26 ## Unlicensed use and reservation of rights
27
28 Any use, reproduction, modification, or distribution of the Enterprise
29 Materials without a valid commercial agreement is unlicensed and constitutes
30 an infringement of MedusaJS, Inc.'s copyright. Circumventing, disabling, or
31 removing any license validation or feature-gating mechanism does not create a
32 license and is itself a violation of this notice. Enabling any Enterprise
33 feature flag constitutes a representation that you hold a valid commercial
34 agreement with MedusaJS, Inc.
35
36 MedusaJS, Inc. reserves all rights and remedies available at law and in
37 equity, including injunctive relief, monetary damages, and recovery of costs
38 and attorneys' fees where available.
39
40 ## Enterprise Materials
41
42 RBAC (role-based access control) and SSO (single sign-on) are Medusa Enterprise Edition features. The following repository paths, including all files below a listed directory, are Enterprise Materials:
43
44 ### RBAC module and backend behavior
45
46 - `packages/modules/rbac/`
47 - `packages/core/core-flows/src/rbac/`
48 - `packages/medusa/src/api/admin/rbac/`
49 - `packages/core/types/src/rbac/`
50 - `packages/core/types/src/http/rbac/`
51 - `packages/core/framework/src/policies/`
52 - `packages/core/framework/src/http/middlewares/check-permissions.ts`
53 - `packages/core/framework/src/http/utils/policies/rbac-field-filter.ts`
54 - `packages/core/utils/src/modules-sdk/define-policies.ts`
55 - `packages/core/utils/src/modules-sdk/policy-to-types.ts`
56 - `packages/medusa/src/feature-flags/rbac.ts`
57 - `packages/medusa/src/feature-flags/rbac-filter-fields.ts`
58 - `packages/medusa/src/modules/rbac.ts`
59 - `packages/modules/link-modules/src/definitions/invite-rbac-role.ts`
60 - `packages/modules/link-modules/src/definitions/user-rbac-role.ts`
61
62 ### RBAC user and invite workflows and APIs
63
64 - `packages/core/core-flows/src/invite/steps/get-invite-roles.ts`
65 - `packages/core/core-flows/src/invite/steps/validate-roles-exist.ts`
66 - `packages/core/core-flows/src/user/steps/get-assignable-policies.ts`
67 - `packages/core/core-flows/src/user/steps/get-assignable-roles.ts`
68 - `packages/core/core-flows/src/user/steps/validate-user-role-permissions.ts`
69 - `packages/core/core-flows/src/user/workflows/assign-user-roles.ts`
70 - `packages/core/core-flows/src/user/workflows/get-assignable-policies.ts`
71 - `packages/core/core-flows/src/user/workflows/get-assignable-roles.ts`
72 - `packages/core/core-flows/src/user/workflows/remove-user-roles.ts`
73 - `packages/medusa/src/api/admin/users/[id]/roles/`
74
75 ### SDK and Admin dashboard
76
77 - `packages/core/js-sdk/src/admin/rbac-policy.ts`
78 - `packages/core/js-sdk/src/admin/rbac-role.ts`
79 - `packages/admin/dashboard/src/routes/policies/`
80 - `packages/admin/dashboard/src/routes/roles/`
81 - `packages/admin/dashboard/src/hooks/api/rbac-policies.tsx`
82 - `packages/admin/dashboard/src/hooks/api/rbac-roles.tsx`
83 - `packages/admin/dashboard/src/hooks/use-require-rbac-feature.tsx`
84 - `packages/admin/dashboard/src/components/common/required-permissions-section/`
85 - `packages/admin/dashboard/src/lib/permissions/`
86 - `packages/admin/dashboard/src/providers/permissions-provider/`
87
88 ### RBAC-specific tests
89
90 - `packages/modules/rbac/integration-tests/`
91 - `integration-tests/http/__tests__/rbac/`
92 - `integration-tests/modules/__tests__/rbac/`
93 - `integration-tests/modules/__tests__/rbac-match-endpoint-entities.spec.ts`
94
95 ### SSO provider and OIDC authentication
96
97 - `packages/modules/providers/auth-oidc/`
98 - `packages/medusa/src/modules/auth-oidc.ts`
99 - `packages/core/types/src/auth/providers/oidc.ts`
100 - `packages/medusa/src/api/auth/[auth_provider]/user/route.ts`
101 - `packages/admin/dashboard/src/routes/login/components/sso-login.tsx`
102
103 Generated, compiled, bundled, or otherwise transformed versions of the files
104 listed above are also Enterprise Materials, even if emitted to another path.
105
106 Files outside this list remain under the MIT License in `LICENSE`, including
107 generic authentication, generic auth provider registration and discovery,
108 generic user and invite management, shared HTTP and workflow infrastructure,
109 and incidental integration points that only register, configure, export, or
110 display the availability of an Enterprise feature.
111
112 UNLESS A COMMERCIAL AGREEMENT WITH MEDUSAJS, INC. EXPRESSLY STATES OTHERWISE:
113 THE ENTERPRISE MATERIALS ARE PROVIDED "AS IS" AND "AS AVAILABLE," WITHOUT
114 WARRANTY OF ANY KIND. TO THE MAXIMUM EXTENT PERMITTED BY LAW, MEDUSAJS, INC.
115 DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
116 ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE,
117 AND NON-INFRINGEMENT. TO THE SAME EXTENT, MEDUSAJS, INC. WILL NOT BE LIABLE
118 FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE
119 DAMAGES, OR FOR ANY LOSS OF DATA, PROFITS, REVENUE, GOODWILL, OR BUSINESS,
120 ARISING OUT OF OR RELATING TO THE ENTERPRISE MATERIALS OR THEIR USE, EVEN IF
121 ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.