payload-rbac-plugin 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +5 -0
- package/dist/types.d.ts +16 -0
- package/package.json +17 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mahmoud Hassan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Payload CMS Dynamic RBAC Plugin
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/payload-rbac-plugin)
|
|
4
|
+
[](https://www.npmjs.com/package/payload-rbac-plugin)
|
|
5
|
+
[](https://github.com/Mhmod-Hsn/Payload-RBAC-Plugin/blob/main/LICENSE)
|
|
6
|
+
[](https://github.com/Mhmod-Hsn/Payload-RBAC-Plugin/actions)
|
|
7
|
+
|
|
3
8
|
A professional, database-backed Role-Based Access Control (RBAC) system for [Payload CMS](https://payloadcms.com) (v3).
|
|
4
9
|
|
|
5
10
|
This plugin emphasizes checking **permissions instead of roles** to avoid hard-coded authorization logic in your source code, making your access control highly scalable, modular, and dynamic.
|
package/dist/types.d.ts
CHANGED
|
@@ -28,4 +28,20 @@ export interface PluginOptions {
|
|
|
28
28
|
* Inject additional custom fields into the generated Permissions collection
|
|
29
29
|
*/
|
|
30
30
|
permissionsFields?: Field[];
|
|
31
|
+
/**
|
|
32
|
+
* Hide the Roles collection from the Admin panel sidebar/dashboard
|
|
33
|
+
* Can be a boolean or a function based on the logged-in user
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
hideRoles?: boolean | ((args: {
|
|
37
|
+
user: any;
|
|
38
|
+
}) => boolean);
|
|
39
|
+
/**
|
|
40
|
+
* Hide the Permissions collection from the Admin panel sidebar/dashboard
|
|
41
|
+
* Can be a boolean or a function based on the logged-in user
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
hidePermissions?: boolean | ((args: {
|
|
45
|
+
user: any;
|
|
46
|
+
}) => boolean);
|
|
31
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payload-rbac-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "RBAC plugin for payloadcms",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,6 +11,22 @@
|
|
|
11
11
|
},
|
|
12
12
|
"homepage": "https://github.com/Mhmod-Hsn/Payload-RBAC-Plugin#readme",
|
|
13
13
|
"license": "MIT",
|
|
14
|
+
"author": "Mahmoud Hassan <hsn.mhmod.96@gmail.com> (https://github.com/Mhmod-Hsn)",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"payload",
|
|
17
|
+
"payloadcms",
|
|
18
|
+
"payload-plugin",
|
|
19
|
+
"plugin",
|
|
20
|
+
"rbac",
|
|
21
|
+
"role-based-access-control",
|
|
22
|
+
"access-control",
|
|
23
|
+
"permissions",
|
|
24
|
+
"roles",
|
|
25
|
+
"security",
|
|
26
|
+
"authorization",
|
|
27
|
+
"auth",
|
|
28
|
+
"typescript"
|
|
29
|
+
],
|
|
14
30
|
"type": "module",
|
|
15
31
|
"exports": {
|
|
16
32
|
".": {
|