@7365admin1/core 3.64.5-staging.302 → 3.64.5-staging.303

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,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.
package/dist/index.d.ts CHANGED
@@ -14397,13 +14397,29 @@ declare function isPlatformOwner(userId?: string | ObjectId | null): Promise<boo
14397
14397
  * with no site (marketplace, broadcasts); a category not in the catalogue or
14398
14398
  * with no permission resources (resident-only and marketplace ones).
14399
14399
  *
14400
- * `NOTIFY_ACCESS_FILTER`: `log` (code default) counts, logs and SENDS TO
14401
- * EVERYONE; `on` drops; `off` reads nothing. `MODULE_LIST_GATE=off` is the
14402
- * same as `off`. Any error sends to everyone.
14400
+ * `NOTIFY_ACCESS_FILTER`: `on` (code default) DROPS; `log` counts, logs and
14401
+ * sends to everyone; `off` reads nothing. `MODULE_LIST_GATE=off` is the same as
14402
+ * `off`. Any error sends to everyone.
14403
+ *
14404
+ * The default was `log` from the day this shipped until the owner turned it on
14405
+ * (2026-09-13), having accepted that some staff will notice alerts they used to
14406
+ * get stopping. Only the MODULE drop became real; the role check above stays
14407
+ * logged only, because most apps still do not enforce their role gates.
14408
+ *
14409
+ * Turning it on changed nothing on its own: the filter returns early unless the
14410
+ * site or its organisation has an ENFORCED module list, and on the day of the
14411
+ * flip no organisation and no site had one (measured read-only on staging: 0 of
14412
+ * 199 organisations, 0 of 256 sites, 0 acknowledged-save markers). It takes
14413
+ * effect for a client the first time a Super Admin saves that client's module
14414
+ * list with the acknowledged preview.
14415
+ *
14416
+ * The env var still wins over this default, so a lead can put it back to `log`
14417
+ * or `off` without waiting for a deploy.
14403
14418
  *
14404
14419
  * Both senders call this: core's `notification.service.ts send()` here, and
14405
14420
  * API-core's own `send()` (a separate class; memory
14406
- * `two-notification-senders-not-one`), which must call it the same way.
14421
+ * `two-notification-senders-not-one`), which imports this very function so
14422
+ * this default governs both, and neither can drift from the other.
14407
14423
  */
14408
14424
  type TNotifyAccessMode = "log" | "on" | "off";
14409
14425
  declare const NOTIFY_ACCESS_FILTER_DEFAULT: TNotifyAccessMode;
package/dist/index.js CHANGED
@@ -16560,7 +16560,7 @@ async function siteModulePreview(site, org, proposed, data = moduleGateData()) {
16560
16560
  }
16561
16561
 
16562
16562
  // src/utils/notification-access.util.ts
16563
- var NOTIFY_ACCESS_FILTER_DEFAULT = "log";
16563
+ var NOTIFY_ACCESS_FILTER_DEFAULT = "on";
16564
16564
  function notifyAccessMode(env2 = process.env) {
16565
16565
  return gateMode(env2.NOTIFY_ACCESS_FILTER, ["log", "on", "off"], NOTIFY_ACCESS_FILTER_DEFAULT);
16566
16566
  }