@7365admin1/layer-common 4.0.3-staging.222 → 4.0.3-staging.223

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.
@@ -15,7 +15,33 @@ export default function useCleaningPermission() {
15
15
  roles: rolePermissions,
16
16
  invitations: invitationPermissions,
17
17
  "bulletin-board": bulletinBoardPermissions,
18
-
18
+
19
+ // `hasPermission` looks an action up as `catalogue[resource][action]`, so a
20
+ // resource with no key here can never answer anything but `false` -- the
21
+ // gate is then reachable only through the `"*"` short-circuit. These two
22
+ // were checked by `-hygiene` (`site-settings:can-view-site-settings`,
23
+ // `:can-manage-site-settings`, `toilet_locations:create-toilet-location`)
24
+ // and were missing from this catalogue entirely, so every non-wildcard role
25
+ // was refused. Action names and shape copied from the sibling module
26
+ // catalogues that already work -- `usePoolMaintenancePermission` and
27
+ // `useLandscapingPermission` both spell it exactly this way.
28
+ "site-settings": {
29
+ "can-view-site-settings": {
30
+ check: true,
31
+ description: "Allows the user to view site settings.",
32
+ },
33
+ "can-manage-site-settings": {
34
+ check: true,
35
+ description: "Allows the user to manage and update site settings.",
36
+ },
37
+ },
38
+ toilet_locations: {
39
+ "create-toilet-location": {
40
+ check: true,
41
+ description: "Allows the user to create/add a toilet location.",
42
+ },
43
+ },
44
+
19
45
  inventory: {
20
46
  "view-inventory": {
21
47
  check: true,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "4.0.3-staging.222",
5
+ "version": "4.0.3-staging.223",
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.",