You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/security-guide.md
+12-7Lines changed: 12 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,25 +5,30 @@
5
5
6
6
## 1. Directory Structure
7
7
8
-
The security configuration supports both **Role-Based Access Control (RBAC)** and **Managed Policies** for reusability.
8
+
The security configuration files (`.role.yml` and `.policy.yml`) can be placed **anywhere** in your module's source path. The system scans for them recursively.
9
+
10
+
**Recommended Structure (Simplified)**:
9
11
10
12
```text
11
13
/project-root
12
-
├── /security
13
-
│ ├── /roles/ # Role Definitions
14
-
│ │ └── sales_rep.role.yml
14
+
├── /src
15
+
│ ├── projects.object.yml
16
+
│ ├── tasks.object.yml
15
17
│ │
16
-
│ └── /policies/ # Reusable Permisison Sets
18
+
│ └── /security # Optional grouping
19
+
│ ├── sales_rep.role.yml
17
20
│ └── contract_manage.policy.yml
18
21
```
19
22
23
+
> **Note:** You can also place them alongside your objects if preferred, or completely flat.
24
+
20
25
## 2. Policy Definition (`.policy.yml`)
21
26
22
27
A **Policy** is a reusable collection of permission statements without being tied to a specific user identity.
23
28
24
29
To facilitate storage in database JSONB columns and efficient querying, the structure uses a **Map** keyed by object name.
A **Role** defines an identity and assigns permissions. It can compose permissions by referencing **Managed Policies** or defining **Online Permissions**.
0 commit comments