@7365admin1/core 3.66.0 → 3.67.0
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 +25 -0
- package/dist/index.d.ts +20 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/test/notification-access.test.mjs +35 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @iservice365/core
|
|
2
2
|
|
|
3
|
+
## 3.67.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7b9ea2f: Notifications: stop sending alerts for modules a client was never given
|
|
8
|
+
|
|
9
|
+
`NOTIFY_ACCESS_FILTER` now defaults to `on` instead of `log`, so the module-based
|
|
10
|
+
drop is real: a recipient no longer gets a notification when every membership they
|
|
11
|
+
hold at the site denies every module the notification's category is about.
|
|
12
|
+
|
|
13
|
+
Only the module drop acts. The role-based check is still computed and logged and
|
|
14
|
+
never drops anybody, because most apps do not enforce their role gates yet and a
|
|
15
|
+
role-based drop would hide alerts for screens people can still open.
|
|
16
|
+
|
|
17
|
+
Unchanged: residents, anyone with no membership at the site, Seven365 staff, sends
|
|
18
|
+
with no site, and categories the catalogue does not govern are all exempt; any
|
|
19
|
+
error sends to everyone; and `MODULE_LIST_GATE=off` still disables it entirely.
|
|
20
|
+
`NOTIFY_ACCESS_FILTER=log` or `off` overrides this default with no deploy.
|
|
21
|
+
|
|
22
|
+
This is inert until a client's module list is enforced — measured read-only on
|
|
23
|
+
staging at the time of the flip, no organisation (0 of 199) and no site (0 of 256)
|
|
24
|
+
had a stored list and there were no acknowledged-save markers, so nothing is
|
|
25
|
+
dropped for anybody until a Super Admin saves a module list with the acknowledged
|
|
26
|
+
preview.
|
|
27
|
+
|
|
3
28
|
## 3.66.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -14185,13 +14185,29 @@ declare function isPlatformOwner(userId?: string | ObjectId | null): Promise<boo
|
|
|
14185
14185
|
* with no site (marketplace, broadcasts); a category not in the catalogue or
|
|
14186
14186
|
* with no permission resources (resident-only and marketplace ones).
|
|
14187
14187
|
*
|
|
14188
|
-
* `NOTIFY_ACCESS_FILTER`: `
|
|
14189
|
-
*
|
|
14190
|
-
*
|
|
14188
|
+
* `NOTIFY_ACCESS_FILTER`: `on` (code default) DROPS; `log` counts, logs and
|
|
14189
|
+
* sends to everyone; `off` reads nothing. `MODULE_LIST_GATE=off` is the same as
|
|
14190
|
+
* `off`. Any error sends to everyone.
|
|
14191
|
+
*
|
|
14192
|
+
* The default was `log` from the day this shipped until the owner turned it on
|
|
14193
|
+
* (2026-09-13), having accepted that some staff will notice alerts they used to
|
|
14194
|
+
* get stopping. Only the MODULE drop became real; the role check above stays
|
|
14195
|
+
* logged only, because most apps still do not enforce their role gates.
|
|
14196
|
+
*
|
|
14197
|
+
* Turning it on changed nothing on its own: the filter returns early unless the
|
|
14198
|
+
* site or its organisation has an ENFORCED module list, and on the day of the
|
|
14199
|
+
* flip no organisation and no site had one (measured read-only on staging: 0 of
|
|
14200
|
+
* 199 organisations, 0 of 256 sites, 0 acknowledged-save markers). It takes
|
|
14201
|
+
* effect for a client the first time a Super Admin saves that client's module
|
|
14202
|
+
* list with the acknowledged preview.
|
|
14203
|
+
*
|
|
14204
|
+
* The env var still wins over this default, so a lead can put it back to `log`
|
|
14205
|
+
* or `off` without waiting for a deploy.
|
|
14191
14206
|
*
|
|
14192
14207
|
* Both senders call this: core's `notification.service.ts send()` here, and
|
|
14193
14208
|
* API-core's own `send()` (a separate class; memory
|
|
14194
|
-
* `two-notification-senders-not-one`), which
|
|
14209
|
+
* `two-notification-senders-not-one`), which imports this very function — so
|
|
14210
|
+
* this default governs both, and neither can drift from the other.
|
|
14195
14211
|
*/
|
|
14196
14212
|
type TNotifyAccessMode = "log" | "on" | "off";
|
|
14197
14213
|
declare const NOTIFY_ACCESS_FILTER_DEFAULT: TNotifyAccessMode;
|
package/dist/index.js
CHANGED
|
@@ -16549,7 +16549,7 @@ async function siteModulePreview(site, org, proposed, data = moduleGateData()) {
|
|
|
16549
16549
|
}
|
|
16550
16550
|
|
|
16551
16551
|
// src/utils/notification-access.util.ts
|
|
16552
|
-
var NOTIFY_ACCESS_FILTER_DEFAULT = "
|
|
16552
|
+
var NOTIFY_ACCESS_FILTER_DEFAULT = "on";
|
|
16553
16553
|
function notifyAccessMode(env2 = process.env) {
|
|
16554
16554
|
return gateMode(env2.NOTIFY_ACCESS_FILTER, ["log", "on", "off"], NOTIFY_ACCESS_FILTER_DEFAULT);
|
|
16555
16555
|
}
|