@7365admin1/layer-common 4.0.4-staging.243 → 4.1.1
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/CHANGELOG.md +37 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 4.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- df2fede: Fix the Service Providers gate: check the permission the estate actually stores
|
|
8
|
+
|
|
9
|
+
`useServiceProviderPermission` shipped in 4.0.3 asking for
|
|
10
|
+
`service-provider:<action>`. Measured read-only against the staging `roles`
|
|
11
|
+
collection on 2026-08-26, that spelling is held by **0 of 428 roles**, while
|
|
12
|
+
`service-provider-mgmt:add-service-provider`, `:invite-service-provider` and
|
|
13
|
+
`:view-service-providers` are held by **79 roles each**. Every role except the 71
|
|
14
|
+
holding `*` was refused, on any consumer that does not bind the three props.
|
|
15
|
+
|
|
16
|
+
The gate now checks `service-provider-mgmt` -- the canonical resource in
|
|
17
|
+
`constants/permissions.ts`, the one the server reads in
|
|
18
|
+
`notification-category.util.ts`, and the one `-property-management`'s own
|
|
19
|
+
`useLocalPermission` has always checked. The view gate accepts both
|
|
20
|
+
`view-service-providers` (what the 79 roles store today) and
|
|
21
|
+
`see-all-service-providers` (canonical), so no role migration is needed for this
|
|
22
|
+
fix to work and none is invalidated later.
|
|
23
|
+
|
|
24
|
+
No permission key is renamed or invented, and no role document changes.
|
|
25
|
+
|
|
26
|
+
## 4.1.0
|
|
27
|
+
|
|
28
|
+
### Minor Changes
|
|
29
|
+
|
|
30
|
+
- a45deb4: Add a canonical permission catalogue and a test that fails when the UI and the server stop agreeing
|
|
31
|
+
|
|
32
|
+
`constants/permissions.ts` exports the canonical spelling of every permission the estate uses, typed so a misspelt string is a build error rather than a check that is silently false forever, plus a map from each legacy spelling (four for work orders, two each for visitors, bulletin boards, buildings and service providers) to its canonical form.
|
|
33
|
+
|
|
34
|
+
Additive only: no gate is rewired and no existing check changes the string it asks for. `test/permission-vocabulary.test.mjs` fails when a new string appears in this package, or when the server's enforced set — snapshotted in `test/fixtures/server-permissions.json` by `tools/refresh-server-permissions.mjs` — contains something the catalogue has no name for.
|
|
35
|
+
|
|
3
36
|
## 4.0.3
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
|
@@ -280,11 +313,11 @@
|
|
|
280
313
|
`utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
|
|
281
314
|
own rule from two endpoints the console already calls, unprojected:
|
|
282
315
|
|
|
283
|
-
|
|
284
|
-
|
|
316
|
+
GET /api/members/user/:user/app/admin the Seven365 staff membership
|
|
317
|
+
GET /api/roles/id/:role that membership's role document
|
|
285
318
|
|
|
286
|
-
|
|
287
|
-
|
|
319
|
+
owner = member.type === "admin" && role.type === "admin" && role.default === true
|
|
320
|
+
staff = member.type === "admin" && role.type === "admin"
|
|
288
321
|
|
|
289
322
|
`role.default` is the marker because it is the only property of a platform
|
|
290
323
|
staff role no API caller can set - `role.controller.ts` validates create and
|
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.
|
|
5
|
+
"version": "4.1.1",
|
|
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.",
|