@7365admin1/core 3.47.1-staging.123 → 3.47.1-staging.125

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.
@@ -0,0 +1,12 @@
1
+ ---
2
+ "@7365admin1/core": patch
3
+ ---
4
+
5
+ Authorize the HID facial-data sync handler in its own body
6
+
7
+ `syncReaderFacialData` reached `staging` with no authorization check inside the
8
+ handler. The API-core router does apply `requireAuth` + `authorizeManage`, so it
9
+ was not reachable by an ordinary signed-in user — but this is a published
10
+ package, and the guard and the handler sat in two different repositories. It now
11
+ runs the same `manage`-level check the router applies, with the site taken from
12
+ the stored reader. The guard test pins it by name.
@@ -15,3 +15,13 @@ jobs:
15
15
  cache: "yarn"
16
16
  - run: yarn install
17
17
  - run: yarn lint && yarn build
18
+ # Separate step so a red suite is attributable at a glance rather than
19
+ # buried in a chained command.
20
+ #
21
+ # `yarn test` only runs `test/*.test.mjs` — pure functions and assertions
22
+ # read from source files. None of them opens a database, a Redis or a
23
+ # network socket, so nothing here needs a secret or a service container.
24
+ #
25
+ # `yarn test:e2e` is deliberately NOT run: it needs a live database. It
26
+ # stays a local/manual check.
27
+ - run: yarn test
package/dist/index.js CHANGED
@@ -84430,6 +84430,7 @@ function useHidAmicoController() {
84430
84430
  return;
84431
84431
  }
84432
84432
  try {
84433
+ await authorizeReaderAccess(req, value.readerId, "manage");
84433
84434
  res.json({ data: await service.syncReaderFacialData(value.readerId) });
84434
84435
  } catch (error2) {
84435
84436
  next(error2);