@7365admin1/core 3.64.5 → 3.65.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 +52 -0
- package/dist/index.d.ts +1055 -677
- package/dist/index.js +7948 -6996
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6087 -5149
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/test/console-permission.test.mjs +4 -3
- package/test/e2e/member-direct-role-org.e2e.test.mjs +255 -0
- package/test/e2e/member-direct-self-enrol-role.e2e.test.mjs +204 -0
- package/test/e2e/org-anon-lookup-projection.e2e.test.mjs +11 -1
- package/test/e2e/organization-read-scope.e2e.test.mjs +4 -1
- package/test/e2e/organization-record-reach.e2e.test.mjs +241 -0
- package/test/e2e/user-field-self-allowlist.e2e.test.mjs +172 -0
- package/test/member-direct-role-org.test.mjs +33 -0
- package/test/member-self-enrol-role.test.mjs +43 -0
- package/test/module-access.test.mjs +128 -0
- package/test/module-gate.fixtures.mjs +108 -0
- package/test/module-gate.test.mjs +64 -0
- package/test/modules-endpoint.test.mjs +525 -0
- package/test/notification-access.test.mjs +197 -0
- package/test/org-record-reach.test.mjs +45 -0
- package/test/resident-app-modules.test.mjs +45 -1
- package/test/role-member-org-scope.test.mjs +2 -1
- package/test/site-modules.test.mjs +22 -0
- package/test/staff-console-authz.test.mjs +9 -0
- package/test/user-field-self-allowlist.test.mjs +39 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# @iservice365/core
|
|
2
2
|
|
|
3
|
+
## 3.65.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 69714b4: Role writes: a site's own module list narrows a role only when the site belongs to the role's organisation. A service provider's role at a client's site is no longer refused modules the client switched off for that site — matching what the role editor now offers.
|
|
8
|
+
|
|
9
|
+
## 3.65.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- c4dc50b: Module gate, server step: the deny-list endpoint, the impact preview, and
|
|
14
|
+
acknowledge-before-save. Everything ships inert and fails open.
|
|
15
|
+
|
|
16
|
+
- `useMemberController().getModulesByUserIdType` (for
|
|
17
|
+
`GET /api/members/user/:id/app/:type/modules?org=&site=`) answers
|
|
18
|
+
`{ denied: string[] }` for the membership `getByUserIdType` answers with. It
|
|
19
|
+
is the same self-or-staff guard. It answers `[]` for no list, an empty list,
|
|
20
|
+
a resident, Seven365 staff, a site of another organisation, any lookup
|
|
21
|
+
error, and `MODULE_LIST_GATE=off`. `ALWAYS_ALLOWED` is never denied.
|
|
22
|
+
- A saved list is enforced only once it has been saved through the
|
|
23
|
+
acknowledged preview. The marker is the save's own append-only console-audit
|
|
24
|
+
row (`gateListHash`). A list saved earlier, or changed any other way, behaves
|
|
25
|
+
as absent. No field is added to any organisation or site.
|
|
26
|
+
- `useOrgController().previewOrgModules` and
|
|
27
|
+
`useSiteController().previewSiteModules` (for
|
|
28
|
+
`POST /api/organizations/:id/modules/preview` and
|
|
29
|
+
`POST /api/sites/:id/modules/preview`) return who would lose what. They are
|
|
30
|
+
read-only and never go through `GET /api/roles`.
|
|
31
|
+
- `updateModules` and `updateSiteModules` accept `acknowledgeImpact`. A save
|
|
32
|
+
that takes a module away from somebody is refused with 409 until it is
|
|
33
|
+
acknowledged. An empty list restores everything and never needs it. Site
|
|
34
|
+
saves are now recorded in the console audit (`site.modules-changed`).
|
|
35
|
+
- `filterByAccess` (Q7) runs at the top of the notification `send()`. It is
|
|
36
|
+
`NOTIFY_ACCESS_FILTER=log` by default: it logs who would be filtered and
|
|
37
|
+
still sends to everyone. It is exported so API-core's own sender can call it.
|
|
38
|
+
- `moduleDeniedForCaller` (Q3) is the server-refusal primitive. It is
|
|
39
|
+
`MODULE_GATE_MODE=log` by default and never refuses. `enforce` refuses only
|
|
40
|
+
the keys in `MODULE_GATE_ENFORCE_KEYS`. Work stamped (`at`) before the
|
|
41
|
+
acknowledged save is accepted.
|
|
42
|
+
- `MODULE_LIST_GATE` (code default `on`) switches all of the above off at
|
|
43
|
+
once.
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- c993ee4: POST /api/members/direct refuses (400) a role that belongs to a different organisation, unless the caller already holds that role in the organisation being joined.
|
|
48
|
+
- 74f228f: POST /api/members/direct: adding yourself now needs a role you may give yourself - Seven365 staff, the organisation's owner, a role you already hold there, or the role your own invitation offers. Enrolling somebody else is unchanged.
|
|
49
|
+
- ae42c1c: GET /api/organizations/id/:id returns the whole organisation record only to a caller with a relationship to it (member, invitee, owner, Seven365 staff, an active resident of one of its sites, or an engaged service provider). Everyone else gets the name-only record the anonymous lookup already returns. It never answers 401/403.
|
|
50
|
+
- 7363b8d: Site Settings saves are no longer refused because the client has one resident-app
|
|
51
|
+
switch turned off. A save is refused only when it would turn ON a resident-app
|
|
52
|
+
switch that the site has stored as off and the client has switched off.
|
|
53
|
+
- 9d1a0f0: PATCH /api/users/field/:id (and v2): on your own account you may change only name, contact, nric, dateOfBirth, profile and gender, and defaultOrg to an organisation you reach. status, email and plateNumber are staff-only.
|
|
54
|
+
|
|
3
55
|
## 3.64.5
|
|
4
56
|
|
|
5
57
|
### Patch Changes
|