Skip to content

Commit 46be691

Browse files
authored
fix: user manual with detailed role management and permission settings (#420)
1 parent 08cfd3f commit 46be691

File tree

3 files changed

+831
-53
lines changed

3 files changed

+831
-53
lines changed

docs/en-US/handbook/acl/manual.md

Lines changed: 252 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,259 @@
11
# User Manual
22

3+
## Management Center
4+
5+
### Role Management
6+
7+
The application comes with two predefined roles: "Admin" and "Member," each with distinct default permission settings tailored to their functionalities.
8+
9+
![](https://static-docs.nocobase.com/da7083c67d794e23dc6eb0f85b1de86c.png)
10+
11+
### Adding, Deleting, and Modifying Roles
12+
13+
The role identifier, a unique system identifier, allows customization of default roles, but the system's predefined roles cannot be deleted.
14+
15+
![](https://static-docs.nocobase.com/35f323b346db4f9f12f9bee4dea63302.png)
16+
17+
### Setting the Default Role
18+
19+
The default role is the one automatically assigned to new users if no specific role is provided during their creation.
20+
21+
![](https://static-docs.nocobase.com/f41bba7ff55ca28715c486dc45bc1708.png)
22+
23+
### Configuring Permissions
24+
25+
#### General Permission Settings
26+
27+
![](https://static-docs.nocobase.com/119a9650259f9be71210121d0d3a435d.png)
28+
29+
##### Configuration Permissions
30+
31+
1. **Allows to configure interface**: This permission governs whether a user can configure the interface. Activating it adds a UI configuration button. The "admin" role has this permission enabled by default.
32+
2. **Allows to install, activate, disable plugins**: This permission dictates whether a user can enable or disable plugins. When active, the user gains access to the plugin manager interface. The "admin" role has this permission enabled by default.
33+
3. **Allows to configure plugins**: This permission lets the user configure plugin parameters or manage plugin backend data. The "admin" role has this permission enabled by default.
34+
4. **Allows to clear cache, reboot application**: This permission is tied to system maintenance tasks like clearing the cache and restarting the application. Once activated, related operation buttons appear in the personal center. This permission is disabled by default.
35+
5. **New menu items are allowed to be accessed by default**: Newly created menus are accessible by default, and this setting is enabled by default.
36+
37+
##### Global Action Permissions
38+
39+
Action permissions apply universally to all data tables and are categorized by operation type. These permissions can be configured based on data scope: all data or the user's own data. The former allows operations on the entire data table, while the latter restricts operations to data relevant to the user.
40+
41+
#### Data Table Operation Permissions
42+
43+
![](https://static-docs.nocobase.com/6a6e0281391cecdea5b5218e6173c5d7.png)
44+
45+
![](https://static-docs.nocobase.com/9814140434ff9e1bf028a6c282a5a165.png)
46+
47+
Collection operation permissions allow fine-tuning of Action permissions by configuring access to resources within each data table. These permissions include:
48+
49+
1. **Action permissions**: These include adding, viewing, editing, deleting, exporting, and importing actions. Permissions are set based on data scope:
50+
- **All records**: Grants the user the ability to perform actions on all records within the data table.
51+
- **Own records**: Restricts the user to perform actions only on records they have created.
52+
53+
2. **Field Permissions**: Field permissions enable you to set specific permissions for each field during different operations. For instance, certain fields can be configured to be view-only, without editing privileges.
54+
55+
#### Menu Permissions
56+
57+
Menu permissions control access based on menu items.
58+
59+
![](https://static-docs.nocobase.com/28eddfc843d27641162d9129e3b6e33f.png)
60+
61+
#### Plugin Configuration Permissions
62+
63+
Plugin configuration permissions control the ability to configure specific plugin parameters. When enabled, the corresponding plugin management interface appears in the management center.
64+
65+
![](https://static-docs.nocobase.com/5a742ae20a9de93dc2722468b9fd7475.png)
66+
67+
## Personal Center
68+
69+
### Role Switching
70+
71+
Users can be assigned multiple roles and switch between them in the personal center. The default role when logging in is determined by the most recently switched role (this value updates with each switch) or, if not applicable, the first role (system default role).
72+
73+
![](https://static-docs.nocobase.com/e331d11ec1ca3b8b7e0472105b167819.png)
74+
75+
## Application in UI
76+
77+
### Data Block Permissions
78+
79+
Visibility of data blocks in a data table is controlled by view operation permissions, with individual configurations taking precedence over global settings.
80+
81+
For example, under global permissions, the "admin" role has full access, but the order table may have individual permissions configured, making it invisible.
82+
83+
Global permission configuration:
84+
85+
![](https://static-docs.nocobase.com/3d026311739c7cf5fdcd03f710d09bc4.png)
86+
87+
Order table individual permission configuration:
88+
89+
![](https://static-docs.nocobase.com/a88caba1cad47001c1610bf402a4a2c1.png)
90+
91+
In the UI, all blocks in the order table are not displayed.
92+
93+
Complete configuration process:
94+
95+
![](https://static-docs.nocobase.com/b283c004ffe0b746fddbffcf4f27b1df.gif)
96+
97+
### Field Permissions
98+
99+
**View**: Determines whether specific fields are visible at the field level, allowing control over which fields are visible to certain roles within the order table.
100+
101+
![](https://static-docs.nocobase.com/30dea84d984d95039e6f7b180955a6cf.png)
102+
103+
In the UI, only fields with configured permissions are visible within the order table block. System fields (Id, CreatedAt, LastUpdatedAt) retain view permissions even without specific configuration.
104+
105+
![](https://static-docs.nocobase.com/40cc49b517efe701147fd2e799e79dcc.png)
106+
107+
- **Edit**: Controls whether fields can be edited and saved (updated).
108+
109+
Configure edit permissions for order table fields (quantity and associated items have edit permissions):
110+
111+
![](https://static-docs.nocobase.com/6531ca4122f0887547b5719e2146ba93.png)
112+
113+
In the UI, only fields with edit permissions are shown in the edit operation form block within the order table.
114+
115+
![](https://static-docs.nocobase.com/12982450c311ec1bf87eb9dc5fb04650.png)
116+
117+
Complete configuration process:
118+
119+
![](https://static-docs.nocobase.com/1dbe559a9579c2e052e194e50edc74a7.gif)
120+
121+
- **Add**: Determines whether fields can be added (created).
122+
123+
Configure add permissions for order table fields (order number, quantity, items, and shipment have add permissions):
124+
125+
![](https://static-docs.nocobase.com/3ab1bbe41e61915e920fd257f2e0da7e.png)
126+
127+
In the UI, only fields with add permissions are displayed within the add operation form block of the order table.
128+
129+
![](https://static-docs.nocobase.com/8d0c07893b63771c428974f9e126bf35.png)
130+
131+
- **Export**: Controls whether fields can be exported.
132+
- **Import**: Controls whether fields can be imported.
133+
134+
### Operation Permissions
135+
136+
Individually configured permissions take the highest priority. If specific permissions are configured, they override global settings; otherwise, the global settings are applied.
137+
138+
- **Add**: Controls whether the add operation button is visible within a block.
139+
140+
Configure individual operation permissions for the order table to allow adding:
141+
142+
![](https://static-docs.nocobase.com/2e3123b5dbc72ae78942481360626629.png)
143+
144+
When the add operation is permitted, the add button appears within the operation area of the order table block in the UI.
145+
146+
![](https://static-docs.nocobase.com/f0458980d450544d94c73160d75ba96c.png)
147+
148+
- **View**: Determines whether the data block is visible.
149+
150+
Global permission configuration (no view permission):
151+
152+
![](https://static-docs.nocobase.com/6e4a1e6ea92f50bf84959dedbf1d5683.png)
153+
154+
Order table individual permission configuration:
155+
156+
![](https://static-docs.nocobase.com/f2dd142a40fe19fb657071fd901b2291.png)
157+
158+
In the UI, data blocks for other data tables remain hidden, but the order table block is shown.
159+
160+
Complete example configuration process:
161+
162+
![](https://static-docs.nocobase.com/b92f0edc51a27b52e85cdeb76271b936.gif)
163+
164+
- **Edit**: Controls whether the edit operation button is displayed within a block.
165+
166+
![](https://static-docs.nocobase.com/fb1c0290e2a833f1c2b415c761e54c45.gif)
167+
168+
Operation permissions can be further refined by setting the data scope.
169+
170+
For example, setting the order data table so users can only edit their own data:
171+
172+
![](https://static-docs.nocobase.com/b082308f62a3a9084cab78a370c14a9f.gif)
173+
174+
- **Delete**: Controls whether the delete operation button is visible within a block.
175+
176+
![](https://static-docs.nocobase.com/021c9e79bcc1ad221b606a9555ff5644.gif)
177+
178+
- **Export**: Controls whether the export operation button is visible within a block.
179+
180+
- **Import**: Controls whether the import operation button is visible within a block.
181+
182+
### Relationship Permissions
183+
184+
#### When Used as a Field
185+
186+
- The visibility of a relationship field is determined by the permissions set on the source table's fields. These permissions control whether the entire relationship field component appears in the user interface.
187+
188+
For example, in the Order table, the "Customer" relationship field is restricted to view and import/export permissions:
189+
190+
![](https://static-docs.nocobase.com/d0dc797aae73feeabc436af285dd4f59.png)
191+
192+
In the UI, this configuration ensures that the "Customer" relationship field does not appear in the add and edit operation sections of the Order table.
193+
194+
Complete example configuration process:
195+
196+
![](https://static-docs.nocobase.com/372f8a4f414feea097c23b2ba326c0ef.gif)
197+
198+
- The permissions for fields within the relationship field component (such as those found in sub-tables or sub-forms) are determined by the permissions of the target data table.
199+
200+
When the relationship field component is a sub-form:
201+
202+
As shown, the "Customer" relationship field in the Order table is granted full permissions, while the Customer table itself is configured to be read-only.
203+
204+
Order table individual permission configuration, "Customer" relationship field has all field permissions:
205+
206+
![](https://static-docs.nocobase.com/3a3ab9722f14a7b3a35361219d67fa40.png)
207+
208+
Customer table individual permission configuration, fields in the Customer table have view-only permissions:
209+
210+
![](https://static-docs.nocobase.com/46704d179b931006a9a22852e6c5089e.png)
211+
212+
In the UI, this configuration results in the "Customer" relationship field being visible in the Order table section. However, when the interface is switched to a sub-form (where fields within the sub-form are visible in the details but hidden during new or edit operations), the behavior changes accordingly.
213+
214+
Complete example configuration process:
215+
216+
![](https://static-docs.nocobase.com/932dbf6ac46e36ee357ff3e8b9ea1423.gif)
217+
218+
Further refinement of sub-form field permissions allows individual fields to be specifically controlled.
219+
220+
For instance, the Customer table can be configured so that the "Customer Name" field is neither visible nor editable:
221+
222+
![](https://static-docs.nocobase.com/e7b875521cbc4e28640f027f36d0413c.png)
223+
224+
Complete example configuration process:
225+
226+
![](https://static-docs.nocobase.com/7a07e68c2fe2a13f0c2cef19be489264.gif)
227+
228+
When the relationship field component is a sub-table, the situation is consistent with sub-forms:
229+
230+
As illustrated, the "Shipment" relationship field in the Order table has full permissions, while the Shipment table is set to read-only.
231+
232+
In the UI, this setup allows the relationship field to be visible. However, when the interface is switched to a sub-table (where fields within the sub-table are visible during viewing operations but hidden during new or edit operations), the behavior adjusts accordingly.
233+
234+
![](https://static-docs.nocobase.com/fd4b7d81cdd765db789d9c85cf9dc324.gif)
235+
236+
Fine-tuning sub-table field permissions also enables specific control over individual fields:
237+
238+
![](https://static-docs.nocobase.com/51d70a624cb2b0366e421bcdc8abb7fd.gif)
239+
240+
#### When Used as a Block
241+
242+
- The visibility of a relationship block is governed by the permissions set on the target table associated with the relationship field, independent of the permissions on the relationship field itself.
243+
244+
For example, the visibility of the "Customer" relationship block is controlled by the permissions configured for the Customer table:
245+
246+
![](https://static-docs.nocobase.com/633ebb301767430b740ecfce11df47b3.gif)
247+
248+
- The fields within a relationship block are controlled by the permissions set on the target table's fields.
249+
250+
As depicted below, the Customer table can be configured to allow viewing of specific fields only:
251+
252+
![](https://static-docs.nocobase.com/35af9426c20911323b17f67f81bac8fc.gif)
253+
3254
## Role Union
4255

5-
Role Union is a permission management mode. According to system settings, system developers can choose to use `Independent roles`, `Allow roles union`, or `Allow roles union`, to meet different permission requirements.
256+
Role Union is a permission management mode. According to system settings, system developers can choose to use `Independent roles`, `Allow roles union`, or `Roles union only`, to meet different permission requirements.
6257

7258
![20250312184651](https://static-docs.nocobase.com/20250312184651.png)
8259

0 commit comments

Comments
 (0)