openxiangda 1.0.10 → 1.0.11
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/lib/cli.js
CHANGED
|
@@ -1920,6 +1920,8 @@ function resolveMenuPermissionTargets(bound, menuCode) {
|
|
|
1920
1920
|
const menuEntry = bound.resources?.menus?.[menuCode];
|
|
1921
1921
|
const menuId = resolveMenuId(bound, menuCode);
|
|
1922
1922
|
if (menuEntry?.formUuid) return [menuEntry.formUuid];
|
|
1923
|
+
// Custom code pages are checked by three platform surfaces: the admin tree
|
|
1924
|
+
// uses menu IDs, /view uses route keys, and bootstrap uses legacy PAGE IDs.
|
|
1923
1925
|
if (menuEntry?.pageId || menuEntry?.pageCode || menuEntry?.routeKey || menuEntry?.legacyFormUuid) {
|
|
1924
1926
|
return unique([menuId, ...resolveCodePagePermissionAliases(bound, menuEntry)]);
|
|
1925
1927
|
}
|
|
@@ -373,7 +373,7 @@ Body:
|
|
|
373
373
|
}
|
|
374
374
|
```
|
|
375
375
|
|
|
376
|
-
An empty `menuFormUuids` array means all menus/pages are visible to the matched roles. For form menus this field can contain form UUIDs. For custom code page menus,
|
|
376
|
+
An empty `menuFormUuids` array means all menus/pages are visible to the matched roles. For form menus this field can contain form UUIDs. For custom code page menus, OpenXiangda CLI `--page-codes` / `--menu-codes` writes the actual menu ID used by the platform admin tree, the route key used by `/view`, and the legacy `PAGE_...` alias used by custom-page bootstrap.
|
|
377
377
|
|
|
378
378
|
### GET `/apps/:appType/page-permission-groups/:groupId`
|
|
379
379
|
|
|
@@ -18,7 +18,9 @@ Role IDs are platform-specific. Store them only in `.openxiangda/state.json` und
|
|
|
18
18
|
|
|
19
19
|
## Page Permission Groups
|
|
20
20
|
|
|
21
|
-
Page permission groups map role codes to visible menu `
|
|
21
|
+
Page permission groups map role codes to visible menu targets. Form menus use their `FORM_...`
|
|
22
|
+
form UUIDs; custom code page/display menus need the menu ID, route key, and legacy `PAGE_...`
|
|
23
|
+
alias because current platform surfaces check different identifiers:
|
|
22
24
|
|
|
23
25
|
```json
|
|
24
26
|
{
|
|
@@ -33,7 +35,7 @@ Rules:
|
|
|
33
35
|
- `roles: []` means all roles can match.
|
|
34
36
|
- `menuFormUuids: []` means all menus/pages are visible to matched roles.
|
|
35
37
|
- Prefer `--form-codes` in CLI for form menus so each profile resolves its own form UUIDs.
|
|
36
|
-
- Prefer `--page-codes` or `--menu-codes` in CLI for custom code page menus. The CLI writes the menu ID
|
|
38
|
+
- Prefer `--page-codes` or `--menu-codes` in CLI for custom code page menus. The CLI writes the menu ID for the admin tree, the route key for `/view`, and the legacy `PAGE_...` alias for custom-page bootstrap.
|
|
37
39
|
|
|
38
40
|
## Form Permission Groups
|
|
39
41
|
|
|
@@ -43,7 +43,7 @@ openxiangda permission page-group-create sales_pages --name "销售页面" --rol
|
|
|
43
43
|
openxiangda permission page-group-create portal_pages --name "门户页面" --page-codes portal_pc,portal_mobile --profile dev
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
Use `--page-codes` or `--menu-codes` for custom code page menus; the CLI resolves code pages to the published menu ID plus the route key and legacy `PAGE_...` alias required by current
|
|
46
|
+
Use `--page-codes` or `--menu-codes` for custom code page menus; the CLI resolves code pages to the published menu ID plus the route key and legacy `PAGE_...` alias required by the platform's current admin tree, `/view` guard, and custom-page bootstrap checks. Use `--form-codes` for form menus; the CLI resolves forms to profile-local form UUIDs. Empty target lists mean all menus/pages are visible to matched roles.
|
|
47
47
|
|
|
48
48
|
## Form Permission Groups
|
|
49
49
|
|