@7365admin1/layer-common 3.2.8-staging.214 → 3.2.8-staging.215
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.
|
@@ -2,7 +2,12 @@ import { useCommonPermissions } from "./useCommonPermission";
|
|
|
2
2
|
|
|
3
3
|
export function useBulletinBoardPermission() {
|
|
4
4
|
const { hasPermission } = usePermission();
|
|
5
|
-
|
|
5
|
+
// Same nesting rule as every other permission composable: `hasPermission`
|
|
6
|
+
// reads `catalogue[resource][action]`, and `bulletinBoardPermissions` is a
|
|
7
|
+
// flat `{action: ...}` map. Unwrapped, `catalogue["bulletin-board"]` was
|
|
8
|
+
// undefined and all five gates were reachable only through `"*"`.
|
|
9
|
+
const { bulletinBoardPermissions } = useCommonPermissions();
|
|
10
|
+
const permissions: TPermissions = { "bulletin-board": bulletinBoardPermissions };
|
|
6
11
|
|
|
7
12
|
const { userAppRole } = useLocalSetup();
|
|
8
13
|
|
|
@@ -2,7 +2,13 @@ import { useCommonPermissions } from "./useCommonPermission";
|
|
|
2
2
|
|
|
3
3
|
export function useSettingsPermission() {
|
|
4
4
|
const { hasPermission } = usePermission();
|
|
5
|
-
|
|
5
|
+
// `hasPermission` looks the action up as `catalogue[resource][action]`, so the
|
|
6
|
+
// catalogue has to be nested by resource. `siteSettingsPermissions` is a flat
|
|
7
|
+
// `{action: ...}` map, so passing it straight through made
|
|
8
|
+
// `catalogue["site-settings"]` undefined and every check below fell through to
|
|
9
|
+
// `false` -- only the `"*"` short-circuit could ever open a panel.
|
|
10
|
+
const { siteSettingsPermissions } = useCommonPermissions();
|
|
11
|
+
const permissions: TPermissions = { "site-settings": siteSettingsPermissions };
|
|
6
12
|
const { userAppRole } = useLocalSetup();
|
|
7
13
|
|
|
8
14
|
const canManageSiteInformation = computed(() => {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@7365admin1/layer-common",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "3.2.8-staging.
|
|
5
|
+
"version": "3.2.8-staging.215",
|
|
6
6
|
"author": "7365admin1",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
|