@7365admin1/core 3.98.0 → 3.99.1-staging.371
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/.changeset/building-map.md +23 -0
- package/.changeset/camera-password-write-only.md +5 -0
- package/.changeset/cctv-live-view-signed.md +12 -0
- package/.changeset/cctv-recorded-footage.md +5 -0
- package/.changeset/cleaning-robot-cloud-connector.md +39 -0
- package/.changeset/client-invite-owner-role-permissions.md +5 -0
- package/.changeset/client-invite-service365.md +5 -0
- package/.changeset/customer-sites-one-row-per-site.md +19 -0
- package/.changeset/fleet-core-client-name.md +5 -0
- package/.changeset/fleet-core-plan-frame.md +5 -0
- package/.changeset/hid-duplicate-enrollment.md +22 -0
- package/.changeset/hid-facial-error-wording.md +20 -0
- package/.changeset/hid-identity-user-link.md +26 -0
- package/.changeset/hid-objectid-across-driver-copies.md +26 -0
- package/.changeset/hid-profile-qr-backend.md +31 -0
- package/.changeset/hid-reader-user-search.md +22 -0
- package/.changeset/hid-sip-account-list.md +17 -0
- package/.changeset/hid-sip-account-unit-label.md +40 -0
- package/.changeset/inventory-notification-category.md +5 -0
- package/.changeset/manpower-authenticated-namespace.md +27 -0
- package/.changeset/member-direct-role-org.md +5 -0
- package/.changeset/member-direct-self-enrol-role.md +5 -0
- package/.changeset/member-list-site-scope.md +5 -0
- package/.changeset/member-lookup-follows-site.md +16 -0
- package/.changeset/members-by-user-reach.md +5 -0
- package/.changeset/module-ceiling-site-owner.md +5 -0
- package/.changeset/module-gate-foundation.md +20 -0
- package/.changeset/module-gate-kill-switch-and-read.md +26 -0
- package/.changeset/module-gate-server.md +35 -0
- package/.changeset/notify-access-filter-on.md +24 -0
- package/.changeset/open-rmf-adapter.md +5 -0
- package/.changeset/org-owner-membership-repair.md +15 -0
- package/.changeset/org-read-reach.md +5 -0
- package/.changeset/org-update-diagnosable-error.md +14 -0
- package/.changeset/patrol-email-scope-restore.md +16 -0
- package/.changeset/people-create-reach-enforce.md +5 -0
- package/.changeset/people-create-reach-gate.md +31 -0
- package/.changeset/people-occupied-structure.md +5 -0
- package/.changeset/real-estate-developer-app-type.md +5 -0
- package/.changeset/real-estate-developer-lookup-both-types.md +5 -0
- package/.changeset/resident-app-access-submodules.md +12 -0
- package/.changeset/resident-app-module-ceiling.md +18 -0
- package/.changeset/robot-adapter-wiring-and-demo.md +24 -0
- package/.changeset/robot-alerts-activity.md +5 -0
- package/.changeset/robot-faults-network.md +7 -0
- package/.changeset/robot-fleet-endpoints.md +26 -0
- package/.changeset/robot-lift-recent.md +5 -0
- package/.changeset/robot-live-tracking.md +18 -0
- package/.changeset/robot-map-and-lift.md +5 -0
- package/.changeset/robot-multi-brand.md +28 -0
- package/.changeset/robot-network-view.md +5 -0
- package/.changeset/robot-remaining-gaps.md +17 -0
- package/.changeset/robot-site-fleet-patrol.md +5 -0
- package/.changeset/role-module-ceiling.md +16 -0
- package/.changeset/role-read-self-arm.md +5 -0
- package/.changeset/role-v2-platform-grant.md +14 -0
- package/.changeset/site-module-allowlist.md +5 -0
- package/.changeset/site-modules-client-admin.md +5 -0
- package/.changeset/site-save-resident-ceiling.md +7 -0
- package/.changeset/sp-invite-accept-flow.md +5 -0
- package/.changeset/sp-invite-accept-for-company.md +5 -0
- package/.changeset/sp-invite-site-link.md +5 -0
- package/.changeset/staff-platform-notifications.md +5 -0
- package/.changeset/user-email-allowlist-subscription-authz.md +21 -0
- package/.changeset/user-field-self-allowlist.md +5 -0
- package/.changeset/user-invite-dedupe.md +5 -0
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +622 -78
- package/dist/index.js +3186 -694
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3171 -694
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/scripts/hid-backfill-enrolment-access.mjs +198 -0
- package/scripts/hid-duplicate-reader-report.mjs +89 -0
- package/test/camera-view.util.test.mjs +47 -0
- package/test/document-expiry-event.test.mjs +146 -0
- package/test/document-expiry-filter.test.mjs +167 -0
- package/test/document-expiry-reminder.test.mjs +161 -0
- package/test/document-type-resolution.test.mjs +62 -0
- package/test/e2e/document-expiry-event-link.e2e.test.mjs +323 -0
- package/test/e2e/harness.mjs +5 -0
- package/test/e2e/service-provider-invite-approval.e2e.test.mjs +395 -2
- package/test/e2e/site-camera-password.e2e.test.mjs +274 -0
- package/test/guard-invite-wiring.test.mjs +48 -0
- package/test/hid-duplicate-registration.test.mjs +220 -0
- package/test/hid-enrolment-grants-access.test.mjs +162 -0
- package/test/hid-face-photo-retention.test.mjs +6 -3
- package/test/hid-facial-without-photo.test.mjs +157 -0
- package/test/hid-identification-drift.test.mjs +363 -0
- package/test/hid-identification-methods.test.mjs +255 -0
- package/test/notification-category.util.test.mjs +21 -0
- package/test/occupancy-tree.test.mjs +128 -0
- package/test/resident-app-modules.test.mjs +63 -0
- package/test/resident-login-account.test.mjs +126 -0
- package/test/service-provider-invite.test.mjs +38 -1
- package/test/site-camera-password.test.mjs +49 -0
- package/test/unit-owner.test.mjs +190 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Building map: a floor plan, and the 3D layout generated from it
|
|
6
|
+
|
|
7
|
+
Adds `building-map.util.ts` — the Open-RMF building-map model (levels, vertices,
|
|
8
|
+
walls, floors, doors, measurements), the scale handling, and the generation step
|
|
9
|
+
that turns an annotated level into the geometry a 3D view draws.
|
|
10
|
+
|
|
11
|
+
The shape is taken from a real `office.building.yaml` in `open-rmf/rmf_demos`,
|
|
12
|
+
and the wall defaults are `traffic_editor`'s own (10cm thick, 2.5m high, 1px =
|
|
13
|
+
5cm before a measurement), so a map made here can be exported to RMF and one
|
|
14
|
+
made in `traffic_editor` read here.
|
|
15
|
+
|
|
16
|
+
`wallsFromOccupancyGrid` traces walls straight out of a floor-plan image, so
|
|
17
|
+
uploading a plan produces a layout without anyone drawing walls by hand — a SLAM
|
|
18
|
+
occupancy grid already marks walls as dark pixels.
|
|
19
|
+
|
|
20
|
+
`buildingMapFromRobotMaps` reads the cleaning robot's own floor maps into that
|
|
21
|
+
model: one level per floor, the vendor's resolution as the scale, its origin as
|
|
22
|
+
the level offset, its cleaning areas as RMF cleaning-zone waypoints and its dock
|
|
23
|
+
as a charger.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Site cameras: the device password is write-only. An edit that leaves the password blank (or omits it) keeps the stored one instead of saving an empty password, so a camera can be switched Active/Inactive without re-typing its login; a new password still replaces it, and creating an ANPR camera still requires one. The plate-detection handler is now registered at boot even when no ANPR camera is active, so a camera switched on later starts listening on its save without an API restart. A guard-post log line no longer prints the camera record.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Sign the camera relay's LIVE view link, the same way recorded footage is already signed
|
|
6
|
+
|
|
7
|
+
The relay's live routes (player page, stream socket, screenshot, clip) had no authorization at
|
|
8
|
+
all. The camera payloads this server returns now carry a signed `liveUrl` and a reusable
|
|
9
|
+
`liveAuth` (`exp=&sig=`), HMAC-SHA256 over `channel|exp` with the same PLAYBACK_SIGNING_KEY and
|
|
10
|
+
the same 120-second lifetime as a playback link. The stored `camera.host` is deliberately left
|
|
11
|
+
untouched: a query string there would switch off the liveVideo capability and would be frozen
|
|
12
|
+
into patrol-route documents. A camera whose relay is not configured is unchanged.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Recorded footage for CCTV cameras: `RELAY_PLAYBACK` capability (`CAMERA_PLAYBACK_RELAYS` + referenced signing key), `getPlayback` signs a 120-second link to the camera relay's recorder playback for a past window of up to 30 minutes, gated by site reach and the new `cctv-mgmt:view-recordings` permission.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Cleaning robot: robot cloud connector, and stop projecting robot credentials
|
|
6
|
+
|
|
7
|
+
Adds the signed client for the cleaning-robot cloud (`robot-cloud.util.ts`,
|
|
8
|
+
`robot-cloud.service.ts`): request signing, the status vocabulary, the
|
|
9
|
+
pixel/metre transform and the area colour conversions, plus the nine
|
|
10
|
+
request/response endpoints. Credentials are passed in by the caller and are
|
|
11
|
+
never read from the environment, logged, or placed in a request body.
|
|
12
|
+
|
|
13
|
+
Also fixes a credential disclosure in the existing robot listing: `getRobots`
|
|
14
|
+
projected `appKey` and `appToken` — the pair that signs every command sent to
|
|
15
|
+
that estate's robots — into the response, so anyone holding `see-all-robots`
|
|
16
|
+
received them. They are no longer returned.
|
|
17
|
+
|
|
18
|
+
Fixes `POST /robots`, which had never worked: the service assigned an ObjectId
|
|
19
|
+
where the model's schema wanted a string, so every create ended in
|
|
20
|
+
`400 "createdBy" must be a string` and no robot could be registered at all.
|
|
21
|
+
|
|
22
|
+
Adds the server-side enforcement of the five robot permissions, which have
|
|
23
|
+
existed in the client catalogue but were never checked by the API. `"*"` allows
|
|
24
|
+
everything; an empty list allows everything only on a `type: "admin"` role (the
|
|
25
|
+
Seven365 staff role is seeded with `[]`, so enforcing it would refuse the
|
|
26
|
+
platform owner); a non-empty list is enforced exactly.
|
|
27
|
+
|
|
28
|
+
Adds `robotSn` to the robot record (optional, discovered from `get-robot-list`
|
|
29
|
+
when absent) and `robot-fleet.service.ts`, which bridges a stored robot to the
|
|
30
|
+
vendor cloud: live state, maps, map image URLs minted at use, and dispatch.
|
|
31
|
+
|
|
32
|
+
Adds a table of which application may set up and monitor which robot type, so
|
|
33
|
+
cleaning robots and security robots share one module while each app sees only
|
|
34
|
+
its own.
|
|
35
|
+
|
|
36
|
+
Adds an optional `type` ("cleaning" | "security") to the robot record with an
|
|
37
|
+
optional filter, so both device classes share one module and one collection
|
|
38
|
+
while each app lists only its own. Existing rows are untouched and an
|
|
39
|
+
unfiltered query behaves exactly as before.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Invite Client: Seven365 staff choose the new client owner's role permissions with the modules (`permissions` on `POST /api/auth/invite/user`, only with `modules`, each inside them, never a console permission). Onboarding writes them on the client's own application owner role and records it as the organisation's `invitedRole`, so the owner's application membership gets exactly that role. Role writes for that application in that organisation stay within it (`*`/empty becomes the grant; wider strings are refused; Seven365 staff are not capped). Clients invited before this are unchanged. Kill switch: `CLIENT_INVITE_OWNER_PERMISSIONS=off`.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Return one row per site from `/api/customer-sites`, named by the site.
|
|
6
|
+
|
|
7
|
+
`getAll` grouped by `{ name, site }`. A customer-sites row is an ENGAGEMENT and
|
|
8
|
+
one site can carry more than one, so two rows for the same site with different
|
|
9
|
+
names both survived as "distinct" — a provider's site list showed four entries
|
|
10
|
+
for three sites, and the site switcher ticked two at once.
|
|
11
|
+
|
|
12
|
+
`name` is also a snapshot from when the engagement was created and goes stale
|
|
13
|
+
when the site is renamed; recency is no guide, since the newer row held the
|
|
14
|
+
staler name. The site is now looked up and its live name projected over the
|
|
15
|
+
snapshot, with the stored name kept as a fallback.
|
|
16
|
+
|
|
17
|
+
The search and the sort both run after the rename, so a site is found and
|
|
18
|
+
ordered by the name it actually has, and the count is derived from the same
|
|
19
|
+
pipeline.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Robots: the Open-RMF brand is presented to clients as "HERO Fleet Core" - brand key `fleet-core`, and every message a client can see says "Fleet Core" / "the fleet server". The building read-through reply carries `source: "fleet-core"`.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Robots: `GET /robots/fleet-core/building` now returns the fleet building's walls, doors and lifts in the HERO plan frame (40 x 26 m, `frame: "hero-plan"`), the same frame the robots' `planPosition` uses, so the HERO building map and lift queue can draw the building under the live robots.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Refuse to enrol the same person on one HID reader twice.
|
|
6
|
+
|
|
7
|
+
`POST /readers/:readerId/identities` and `PATCH /identities/:identityId` now
|
|
8
|
+
check whether the linked resident, staff member or service provider already
|
|
9
|
+
holds a HID user on that reader, and refuse with a 400 naming the user that is
|
|
10
|
+
in the way. The existing duplicate check in `addIdentity` could not catch this:
|
|
11
|
+
it asks about the reader's own keys, and enrolment allocates a fresh
|
|
12
|
+
`hidUserId` and registration every time, so a second enrolment of one person
|
|
13
|
+
looked entirely new while leaving the reader holding two users for one human.
|
|
14
|
+
|
|
15
|
+
The check is reader-scoped on purpose — the same person enrolled at a different
|
|
16
|
+
gate is normal. Visitors are excluded, because their identity is re-issued
|
|
17
|
+
rather than duplicated and a returning visitor legitimately gets a new
|
|
18
|
+
credential on the same reader.
|
|
19
|
+
|
|
20
|
+
`GET /readers/:readerId/identities` takes an optional `person` filter so the
|
|
21
|
+
enrolment form can ask the same question before it writes anything to the
|
|
22
|
+
device.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Say what a rejected face photo actually means.
|
|
6
|
+
|
|
7
|
+
A facial failure was passed through as the reader wrote it, so an operator was
|
|
8
|
+
shown `HID facial enrollment failed - code 3: Face exists Scores:
|
|
9
|
+
{"bounds_width":240,...}`. The code is the device's, the scores are its quality
|
|
10
|
+
figures for the photo, and neither says what went wrong or what to do.
|
|
11
|
+
|
|
12
|
+
The codes we have seen the reader return are now written as sentences: a face
|
|
13
|
+
already enrolled under another HID user, a face too close to the camera, a face
|
|
14
|
+
not square to it, a face too near the photo's edge. The device's own codes are
|
|
15
|
+
quoted once at the end so support still has them, and a code we have not seen is
|
|
16
|
+
passed through verbatim rather than guessed at.
|
|
17
|
+
|
|
18
|
+
The raw errors and quality scores move off the message and onto the
|
|
19
|
+
`hid-amico-events` row, which is where a rejected photo gets diagnosed later.
|
|
20
|
+
They were the least useful half of a modal and the most useful half of a log.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Store the user account on a HID identity, and recognise one person across every
|
|
6
|
+
id they are filed under.
|
|
7
|
+
|
|
8
|
+
An identity's link fields name a RECORD, and different screens name the same
|
|
9
|
+
human through different records: permission reconciliation writes `user` and
|
|
10
|
+
`member`, the enrolment screen writes `person`, and the enrolment picker itself
|
|
11
|
+
has offered two different things over time, since `loadPermissionSubjects`
|
|
12
|
+
returns a `site.people` id for a resident with an account and a `users` id for
|
|
13
|
+
one without. The duplicate check compared field to matching field, so it saw
|
|
14
|
+
none of it. One reader was found holding three HID users for one resident, keyed
|
|
15
|
+
`user`, `person`-as-user-id and `person`-as-people-id.
|
|
16
|
+
|
|
17
|
+
`createIdentity` and `updateIdentity` now resolve the subject's account through
|
|
18
|
+
`resolvePermissionUserBindings`, the same resolver the permissions screen uses,
|
|
19
|
+
and store it as `user` alongside the record link. The duplicate check matches
|
|
20
|
+
every id that names the subject against every field that can hold one, so a
|
|
21
|
+
resident already enrolled through any screen is refused rather than duplicated.
|
|
22
|
+
|
|
23
|
+
`GET /readers/:readerId/identities` gains a `subject` filter that asks the same
|
|
24
|
+
question, so the enrolment screen can warn before it writes anything to the
|
|
25
|
+
device instead of failing at submit. The existing `person` filter is unchanged
|
|
26
|
+
and remains an exact match on that one field.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Stop the HID repository mistaking every id it reads from Mongo for "not an id".
|
|
6
|
+
|
|
7
|
+
`optionalObjectId` in `hid-amico.repo.ts` identified ObjectIds with
|
|
8
|
+
`instanceof`. That only ever holds for an id this file minted itself: three
|
|
9
|
+
copies of the `mongodb` package are installed across `iservice365-core`,
|
|
10
|
+
`iservice365-utils` and `iservice365-API-core`, and `useAtlas` opens its
|
|
11
|
+
connection with the one under `iservice365-utils`, so every id on every
|
|
12
|
+
document it returns belongs to a different class. `instanceof` was false and
|
|
13
|
+
the value fell through to a `typeof value !== "string"` branch that returned
|
|
14
|
+
null.
|
|
15
|
+
|
|
16
|
+
The visible effect was enrolment. `assertPermissionSubject` treats a resident
|
|
17
|
+
as valid only when their `site.people` record carries a linked user account,
|
|
18
|
+
and it read that link through this helper — so a resident with an account read
|
|
19
|
+
as a resident without one, and `POST /readers/:readerId/identities` answered
|
|
20
|
+
400 "The linked HID identity subject is not active at this site." for residents
|
|
21
|
+
who were perfectly enrollable.
|
|
22
|
+
|
|
23
|
+
Ids are now read structurally, by `toHexString`, which every copy's ObjectId
|
|
24
|
+
has. `toValidatedId` goes through the same helper, so it too stops rejecting
|
|
25
|
+
ids that came from the database. `hid-amico.model.ts` already read ids this
|
|
26
|
+
way; this brings the repository in line with it.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Let a signed-in member hold their own HID QR code.
|
|
6
|
+
|
|
7
|
+
`GET`, `POST` and `DELETE /readers/:readerId/profile-qr` read, issue and revoke
|
|
8
|
+
the caller's own QR credential on one reader. The caller comes from the session,
|
|
9
|
+
so there is no user id in the path to point at somebody else, and each handler
|
|
10
|
+
calls `authorizeReader` for itself rather than trusting the router - the site is
|
|
11
|
+
re-resolved from the stored reader record.
|
|
12
|
+
|
|
13
|
+
The credential is the visitor mechanism: an alphanumeric value in the reader's
|
|
14
|
+
`qrcodes` table, with the reader put into the QR-readable configuration first.
|
|
15
|
+
Unlike a visitor pass it carries no validity window, matching the member's
|
|
16
|
+
facial enrollment, which is standing until removed. Issuing replaces any earlier
|
|
17
|
+
code for that member on that reader, and the replacement is written and verified
|
|
18
|
+
before the old one is removed.
|
|
19
|
+
|
|
20
|
+
It creates no access rule, deliberately. `setProfileFacial` beside it does not
|
|
21
|
+
either: a member's door access comes from the HID permissions screen, and
|
|
22
|
+
minting a rule here would mean anyone who can press Generate admits themselves.
|
|
23
|
+
The read reports whether that screen admits them, resolved through
|
|
24
|
+
`resolvePermissionUserBindings` - the same resolver that writes the rules onto
|
|
25
|
+
the device - so the answer is the one the reader will actually be asked.
|
|
26
|
+
|
|
27
|
+
Two settings are now readable that were already writable: the QR identification
|
|
28
|
+
and legacy-mode flags `configureVisitorQrReader` sets on every issue, plus
|
|
29
|
+
`access_rule_time_zones` alongside its two sibling link tables. Whether a reader
|
|
30
|
+
was set up to accept a QR, and whether an access rule had a schedule, were
|
|
31
|
+
invisible to every screen and every diagnosis.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Make the search on the HID reader user roster work.
|
|
6
|
+
|
|
7
|
+
`listReaderUsers` asked the device to filter. Amico's `where` takes a value or a
|
|
8
|
+
list of values per column and has no operator form, so the substring clause it
|
|
9
|
+
sent for a text term, `{name: {LIKE: "%x%"}}`, was answered
|
|
10
|
+
`400 Invalid value (string or array expected)`. Every search by name threw, and
|
|
11
|
+
the screen showed "Unable to load HID users from reader" with an empty table.
|
|
12
|
+
|
|
13
|
+
A numeric term took a different branch that matched the HID user id exactly.
|
|
14
|
+
That did not fail, it answered wrongly: searching a registration number like
|
|
15
|
+
`000004` resolved to `id = 4` and returned a different person.
|
|
16
|
+
|
|
17
|
+
Rows are already pulled in one page and filtered here for `userType`, so the
|
|
18
|
+
search now joins that filter as a case-insensitive substring over name, id and
|
|
19
|
+
registration - the same three fields, and the same "contains" semantics, the
|
|
20
|
+
identities search uses. Verified against a live reader: a name matches
|
|
21
|
+
partially and case-insensitively, a registration number returns its own user,
|
|
22
|
+
a full UID still works, and no match returns an empty page rather than an error.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
List a site's HID SIP accounts for the intercom contact picker.
|
|
6
|
+
|
|
7
|
+
`hid-sip-accounts` could only be reached through `ensureSipAccount`, which
|
|
8
|
+
creates and returns the CALLER's own extension together with its password.
|
|
9
|
+
The intercom contact dialog needs the opposite view: every person on the site
|
|
10
|
+
who holds an extension, so a contact names someone the reader can actually
|
|
11
|
+
ring instead of a free-typed label.
|
|
12
|
+
|
|
13
|
+
`listSipAccounts(orgId, siteId)` reads the site's non-disabled accounts, joins
|
|
14
|
+
each to its `users` row for the display name and email, and returns name,
|
|
15
|
+
extension, username and status per account. The SIP password is never in the
|
|
16
|
+
response. The controller guards it with `authorizeSite` in the handler body,
|
|
17
|
+
the same way `listEnrollmentReaders` does, so a router edit cannot expose it.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Return the owner's block, level and unit with each HID SIP account.
|
|
6
|
+
|
|
7
|
+
`listSipAccounts` answered a name, email and extension per account, which is
|
|
8
|
+
enough to say who holds an extension but not which home it reaches. Two
|
|
9
|
+
residents called Harris were indistinguishable in the intercom contact picker,
|
|
10
|
+
and the contact saved onto the reader carried no address at all — so the door
|
|
11
|
+
panel's contact list named a person without saying whose unit was being rung.
|
|
12
|
+
|
|
13
|
+
Each row now carries `unitLabel`, the readable `Blk 1/Level 1/Unit 1`. The three
|
|
14
|
+
stored values are ObjectIds into `buildings`, `building-levels` and
|
|
15
|
+
`building-units`, so every one is resolved to its name; joining the raw values
|
|
16
|
+
would stamp `665f.../665f.../665f...` onto the reader. A block carries both a
|
|
17
|
+
number and an optional descriptive name and the short number wins, because the
|
|
18
|
+
label is read off a door panel.
|
|
19
|
+
|
|
20
|
+
The address comes from `site.people` first — where it is edited, and the source
|
|
21
|
+
`loadPermissionSubjects` already trusts for a resident's subtitle — and falls
|
|
22
|
+
back to the copy `person.service` keeps on `users`, for an account whose owner
|
|
23
|
+
has no active person row on the site.
|
|
24
|
+
|
|
25
|
+
An owner with neither does not live here, so `unitLabel` carries their
|
|
26
|
+
membership type instead — "Security Agency" rather than nothing — read from a
|
|
27
|
+
live `members` row on the SAME site. A user can hold several memberships (the
|
|
28
|
+
unique index is `org_1_siteId_1_user_1_type_1`), so a non-organization row is
|
|
29
|
+
preferred: "organization" names the company that employs them, not what they are
|
|
30
|
+
at this door. It is still used when it is the only membership there is. A `type`
|
|
31
|
+
of 24 hex characters is dropped rather than printed — `MMember` accepts an
|
|
32
|
+
organisation id in that field, and stamping one onto the reader's contact list
|
|
33
|
+
would be the same defect as joining the raw block and level ids.
|
|
34
|
+
|
|
35
|
+
`""` only when the site knows neither, which the picker reads as "no suffix" and
|
|
36
|
+
leaves the bare name.
|
|
37
|
+
|
|
38
|
+
Four id-keyed lookups for the whole list, not one per row, and the `members`
|
|
39
|
+
read is skipped entirely when every owner already has an address. The response
|
|
40
|
+
still never contains a SIP password.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Manpower live status: an authenticated namespace beside the open one
|
|
6
|
+
|
|
7
|
+
`/manpower` streams every client site's live staffing level — how many guards are
|
|
8
|
+
actually on shift against how many were promised — to anyone who connects, with no
|
|
9
|
+
credential of any kind.
|
|
10
|
+
|
|
11
|
+
This adds `/manpower-live`, carrying exactly the same `manpower-status-update`
|
|
12
|
+
events, which admits a socket only when the handshake presents a session id that
|
|
13
|
+
resolves to a live session. Every refusal is an identical `Unauthorized`, and a
|
|
14
|
+
session store that is down refuses rather than letting everyone in.
|
|
15
|
+
|
|
16
|
+
`/manpower` itself is deliberately unchanged: the Capacitor guard app installed on
|
|
17
|
+
phones today and the Nuxt security screen both connect to it with no credential and
|
|
18
|
+
would be cut off the moment it were tightened. Every update is emitted to both, so
|
|
19
|
+
the two feeds can never disagree, and both namespaces share one connection handler,
|
|
20
|
+
so a client on the authenticated feed still starts the poll and still gets an
|
|
21
|
+
immediate snapshot.
|
|
22
|
+
|
|
23
|
+
A live session is the whole check, deliberately. Scoping the feed to the caller's
|
|
24
|
+
own sites is not possible today: manpower lives in HRM Labs' vendor id space, none
|
|
25
|
+
of those site ids match ours, and no field links the two — a site check would empty
|
|
26
|
+
the screen for the one customer using it. That mapping is a schema change and
|
|
27
|
+
belongs to the leads.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
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.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
`GET /api/members?org=` lists only the sites a caller is pinned to when the caller holds no organisation-wide membership or organisation-level role there; a `siteId` outside those sites is refused. Organisation-wide members, owners/invitees and Seven365 staff are unchanged; a resident-only caller lists no staff.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
A person's role now follows the site they are on.
|
|
6
|
+
|
|
7
|
+
`GET /api/members/user/:id/app/:type` accepts an optional `?site=` (a 24-hex
|
|
8
|
+
site id, like `?org=`). When it is sent, the answer is the person's live
|
|
9
|
+
membership of that app type pinned to that site (inside `?org=` when it is also
|
|
10
|
+
sent); failing that, their organisation-wide membership in `?org=`; failing
|
|
11
|
+
that, any live membership in `?org=`. When none of these exists the route
|
|
12
|
+
answers exactly as before. A removed membership never wins, and a site never
|
|
13
|
+
turns a found membership into "not found". Callers that do not send `site`
|
|
14
|
+
see no change. Login, auth-v2 and verification are unchanged.
|
|
15
|
+
|
|
16
|
+
The rule is the pure `pickSiteMembership` in `utils/member-lookup.util.ts`.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
`GET /api/members/users/:id` no longer shows anybody's memberships to any signed-in account. The person and Seven365 staff still get the full list; anyone else gets only the memberships in organisations they belong to, were invited to or own (an empty list, not an error, when there are none).
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
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.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Lay the groundwork for module lists becoming a gate, without narrowing anyone.
|
|
6
|
+
|
|
7
|
+
- New `utils/module-gate.util.ts`: the list of modules a client's list can
|
|
8
|
+
govern (generated from layer-common 5a96f95), the spelling groups, the
|
|
9
|
+
always-included set, and pure functions that work out which modules a
|
|
10
|
+
caller's apps must hide (`deniedModules`) and who would lose what if a list
|
|
11
|
+
changed (`moduleImpact`). Nothing calls them yet.
|
|
12
|
+
- The organisation and site module checks now treat every spelling of a module
|
|
13
|
+
as the same module (ticking `workOrder` also allows `work_orders`,
|
|
14
|
+
`work_order` and `work-orders`), and never refuse members, invitations, roles,
|
|
15
|
+
sites, customers, subscriptions, payment methods or site settings. This only
|
|
16
|
+
ever refuses less than before.
|
|
17
|
+
- A Site Settings save (`PATCH /api/sites/id/:id`) now always keeps the site's
|
|
18
|
+
stored module list. Before this, the save replaced `metadata` wholesale and
|
|
19
|
+
could wipe or overwrite that list. `PATCH /api/sites/:id/modules` is the only
|
|
20
|
+
way to change it.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Module gate: the kill switch now stops the 409, and the check stops reading when there is nothing to decide
|
|
6
|
+
|
|
7
|
+
Two follow-ups from the module-gate server review, both behaviour-neutral for
|
|
8
|
+
anybody who is not using the kill switch.
|
|
9
|
+
|
|
10
|
+
**`MODULE_LIST_GATE=off` now means off.** Every other part of the gate checked the
|
|
11
|
+
master switch; `mustAcknowledge` did not. So with the gate switched off, a save that
|
|
12
|
+
narrowed a client's module list was still refused with a 409 "acknowledge the impact
|
|
13
|
+
first" — the one lever a lead would reach for in an emergency, not working for the
|
|
14
|
+
one path that blocks a save from going through. Both the organisation and the site
|
|
15
|
+
save paths go through that function, so both are fixed. With the switch at its
|
|
16
|
+
default the 409 behaves exactly as before, and that is asserted.
|
|
17
|
+
|
|
18
|
+
**`moduleDeniedForCaller` no longer reads memberships when no list is enforced.** It
|
|
19
|
+
runs on every governed request and read the caller's memberships before finding out
|
|
20
|
+
whether there was anything to decide — and `members.user` has no index to use. It now
|
|
21
|
+
returns early unless the site or its organisation has an enforced list, which is what
|
|
22
|
+
the notification filter already did. No verdict changes: a client that really has an
|
|
23
|
+
enforced list is still measured exactly as before, and that is asserted too.
|
|
24
|
+
|
|
25
|
+
Also corrects the 3.65.0 changelog, which claimed `MODULE_LIST_GATE` switched all of
|
|
26
|
+
the gate off at once. It did not, for the reason above.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Module gate, server step: the deny-list endpoint, the impact preview, and
|
|
6
|
+
acknowledge-before-save. Everything ships inert and fails open.
|
|
7
|
+
|
|
8
|
+
- `useMemberController().getModulesByUserIdType` (for
|
|
9
|
+
`GET /api/members/user/:id/app/:type/modules?org=&site=`) answers
|
|
10
|
+
`{ denied: string[] }` for the membership `getByUserIdType` answers with. It
|
|
11
|
+
is the same self-or-staff guard. It answers `[]` for no list, an empty list,
|
|
12
|
+
a resident, Seven365 staff, a site of another organisation, any lookup
|
|
13
|
+
error, and `MODULE_LIST_GATE=off`. `ALWAYS_ALLOWED` is never denied.
|
|
14
|
+
- A saved list is enforced only once it has been saved through the
|
|
15
|
+
acknowledged preview. The marker is the save's own append-only console-audit
|
|
16
|
+
row (`gateListHash`). A list saved earlier, or changed any other way, behaves
|
|
17
|
+
as absent. No field is added to any organisation or site.
|
|
18
|
+
- `useOrgController().previewOrgModules` and
|
|
19
|
+
`useSiteController().previewSiteModules` (for
|
|
20
|
+
`POST /api/organizations/:id/modules/preview` and
|
|
21
|
+
`POST /api/sites/:id/modules/preview`) return who would lose what. They are
|
|
22
|
+
read-only and never go through `GET /api/roles`.
|
|
23
|
+
- `updateModules` and `updateSiteModules` accept `acknowledgeImpact`. A save
|
|
24
|
+
that takes a module away from somebody is refused with 409 until it is
|
|
25
|
+
acknowledged. An empty list restores everything and never needs it. Site
|
|
26
|
+
saves are now recorded in the console audit (`site.modules-changed`).
|
|
27
|
+
- `filterByAccess` (Q7) runs at the top of the notification `send()`. It is
|
|
28
|
+
`NOTIFY_ACCESS_FILTER=log` by default: it logs who would be filtered and
|
|
29
|
+
still sends to everyone. It is exported so API-core's own sender can call it.
|
|
30
|
+
- `moduleDeniedForCaller` (Q3) is the server-refusal primitive. It is
|
|
31
|
+
`MODULE_GATE_MODE=log` by default and never refuses. `enforce` refuses only
|
|
32
|
+
the keys in `MODULE_GATE_ENFORCE_KEYS`. Work stamped (`at`) before the
|
|
33
|
+
acknowledged save is accepted.
|
|
34
|
+
- `MODULE_LIST_GATE` (code default `on`) switches all of the above off at
|
|
35
|
+
once.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Notifications: stop sending alerts for modules a client was never given
|
|
6
|
+
|
|
7
|
+
`NOTIFY_ACCESS_FILTER` now defaults to `on` instead of `log`, so the module-based
|
|
8
|
+
drop is real: a recipient no longer gets a notification when every membership they
|
|
9
|
+
hold at the site denies every module the notification's category is about.
|
|
10
|
+
|
|
11
|
+
Only the module drop acts. The role-based check is still computed and logged and
|
|
12
|
+
never drops anybody, because most apps do not enforce their role gates yet and a
|
|
13
|
+
role-based drop would hide alerts for screens people can still open.
|
|
14
|
+
|
|
15
|
+
Unchanged: residents, anyone with no membership at the site, Seven365 staff, sends
|
|
16
|
+
with no site, and categories the catalogue does not govern are all exempt; any
|
|
17
|
+
error sends to everyone; and `MODULE_LIST_GATE=off` still disables it entirely.
|
|
18
|
+
`NOTIFY_ACCESS_FILTER=log` or `off` overrides this default with no deploy.
|
|
19
|
+
|
|
20
|
+
This is inert until a client's module list is enforced — measured read-only on
|
|
21
|
+
staging at the time of the flip, no organisation (0 of 199) and no site (0 of 256)
|
|
22
|
+
had a stored list and there were no acknowledged-save markers, so nothing is
|
|
23
|
+
dropped for anybody until a Super Admin saves a module list with the acknowledged
|
|
24
|
+
preview.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Open-RMF bridge: a new robot brand `open-rmf` that reaches an Open-RMF server's rmf-web api-server (fleet/robot state, patrol and clean tasks, pause/resume/cancel, return to charger), a door contract mirroring `rmf_door_msgs`, RMF door and lift drivers behind `TDoorDriver` / `TLiftDriver`, and `getOpenRmfBuilding` on the robot map controller (`GET /robots/open-rmf/building?site=`) - the RMF building read through at view time, never stored. Dormant unless `OPEN_RMF_API_URL` is set: the brand is not registered and the read-through answers 404.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Add a staff-only handler that repairs an organisation's missing owner membership.
|
|
6
|
+
|
|
7
|
+
An organisation created before 3.60.0 can exist with no `members` row at all, so
|
|
8
|
+
`GET /api/members/user/:id/app/organization` answers 404 and every console
|
|
9
|
+
landing page tells the real owner that no organisation exists. The new
|
|
10
|
+
`orgOwnerRepairHandlers` writes the one membership the onboarding path already
|
|
11
|
+
writes, for one organisation at a time, and only when that organisation is
|
|
12
|
+
active, holds exactly zero `organization` memberships, and has an account
|
|
13
|
+
registered under its own e-mail address. Staff-only (`organizations` console
|
|
14
|
+
permission), idempotent under a one-writer claim, audited, and behind the
|
|
15
|
+
`ORG_OWNER_REPAIR` switch. No schema change and no migration.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
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.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Say what is wrong when an organisation cannot be saved.
|
|
6
|
+
|
|
7
|
+
`PUT /api/organizations/:id` — the write behind onboarding step 1 and the staff
|
|
8
|
+
Client List edit — collapsed every MongoDB write error into a 500 reading
|
|
9
|
+
"Failed to update organization.", with only `error.message` in the log. A
|
|
10
|
+
duplicate-key refusal (the `organizations` collection still carries a unique
|
|
11
|
+
index an earlier version of this file created and nothing ever dropped) is now
|
|
12
|
+
a 400 naming the field the caller has to change, a typed error raised
|
|
13
|
+
underneath is no longer turned into a 500, and the log line carries the error
|
|
14
|
+
name, code, key and the organisation id.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Restore and extend the site scoping on the patrol-log email endpoints.
|
|
6
|
+
|
|
7
|
+
#1967 added a `requireSiteReach` guard to `POST /api/patrol-logs/email`. #1981,
|
|
8
|
+
branched before #1967 landed, rewrote the same controller to add the history
|
|
9
|
+
endpoints and dropped the guard. Neither repo runs its tests in CI, so the e2e
|
|
10
|
+
test #1967 shipped has been failing on `main` unnoticed ever since.
|
|
11
|
+
|
|
12
|
+
All five endpoints now resolve the caller from the session: the two that name a
|
|
13
|
+
site (`send`, `getAll`) check that site, and the three that name a record
|
|
14
|
+
(`resend`, `getById`, `deleteById`) check the site stored on the record. The
|
|
15
|
+
`createdBy` pinning is restored with them, so a send cannot be filed under
|
|
16
|
+
another user's name.
|