@7365admin1/core 3.55.0 → 3.56.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 CHANGED
@@ -1,5 +1,42 @@
1
1
  # @iservice365/core
2
2
 
3
+ ## 3.56.0
4
+
5
+ ### Minor Changes
6
+
7
+ - dc09517: Separate Seven365's roles from a client's, and enforce it on the server
8
+
9
+ `role.controller.ts requireRoleOrg` sends every role with no `org` to the staff
10
+ console gate, on the assumption that org-less means "a platform role". It does
11
+ not. A role with `type: "organization"` and no `org` is a TEMPLATE that clients
12
+ are invited with — "Org Owner" is one document behind 119 live members and 320
13
+ invitations on staging — and the console could rewrite it.
14
+
15
+ On 2026-09-07 it did. The console's role editor renders `useAdminPermission`,
16
+ the eleven PLATFORM resources, and the save wrote all 34 of those strings onto
17
+ that template. An empty permission list means "everything"
18
+ (`console-permission.util.ts consoleRoleAllowsAll`), so the role granted
19
+ everything right up to the moment it held a non-empty list — and the list it
20
+ then held contained no client module at all. Every holder, in every client, lost
21
+ every module at once.
22
+
23
+ `role-scope.util.ts` adds the missing distinction — platform (`type: "admin"`),
24
+ client template (no `org`), client (`org` set) — and two refusals built on it:
25
+
26
+ - the four role WRITES refuse a shared client template outright. Reads are
27
+ untouched: 119 members read that role on every session, and refusing them is
28
+ the same outage from the other direction.
29
+ - `createRole`, `updateRole` and `updatePermissionsById` refuse a console
30
+ permission string being ADDED to a role that is not a platform role. Strings
31
+ already stored pass through, so no save that works today begins to fail —
32
+ including the 114 org roles whose `subscriptions:*` grants are a
33
+ resource-NAME collision with the console's, not a platform grant.
34
+
35
+ No document is written, migrated or classified. `tools/role-scope-lockout-check`
36
+ measures the change from the account side, per account type, the way org-api
37
+ #470 does for site scoping: 400 staging accounts across 12 types, **zero
38
+ refusals in every type**, and zero roles that could no longer be re-saved.
39
+
3
40
  ## 3.55.0
4
41
 
5
42
  ### Minor Changes