@7365admin1/core 3.56.0 → 3.58.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 +57 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3992 -3935
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1676 -1619
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/test/e2e/harness.mjs +2 -0
- package/test/e2e/org-default-roles.e2e.test.mjs +320 -0
- package/test/e2e/role-template-restore.e2e.test.mjs +369 -0
- package/test/org-default-roles.test.mjs +218 -0
- package/test/role-scope-separation.test.mjs +149 -0
- package/test/role-scope.test.mjs +15 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# @iservice365/core
|
|
2
2
|
|
|
3
|
+
## 3.58.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f20014d: Allow a Seven365 platform admin to restore a shared client role template to allow-all.
|
|
8
|
+
|
|
9
|
+
The role-scope guard refuses every write to an org-less client template. That is correct for
|
|
10
|
+
preventing the 2026-09-07 outage and it left no way to repair one: "Org Owner" still holds the 34
|
|
11
|
+
platform permission strings and the guard refuses the write that would give its members their
|
|
12
|
+
modules back.
|
|
13
|
+
|
|
14
|
+
`refuseSharedClientTemplate` now takes the permission list the write would store and permits it when
|
|
15
|
+
that list MEANS EVERYTHING (`["*"]` or `[]`). Every other list stays refused with the same message,
|
|
16
|
+
including the 34 strings and including a hand-built superset — a template has no editor that draws
|
|
17
|
+
the right catalogue, and an equal-set write is the broken state being re-saved. The restore is only
|
|
18
|
+
reachable after the existing staff console check, and is recorded with actor, role and before/after.
|
|
19
|
+
|
|
20
|
+
## 3.57.0
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- 4b1f024: **A new client organisation is now created with its own owner roles.**
|
|
25
|
+
|
|
26
|
+
Measured on staging: of 195 live organisations, **74 hold not one role**, and not
|
|
27
|
+
one of those 74 has a subscription. The paid signup path
|
|
28
|
+
(`subscription.service.ts createOrgSubscription`) has always seeded two roles
|
|
29
|
+
named `owner` with `permissions: ["*"]`; the paths that actually create clients
|
|
30
|
+
today seeded nothing:
|
|
31
|
+
|
|
32
|
+
- `POST /organizations` — the Seven365 console creating a client
|
|
33
|
+
- `POST /organizations/onboarding` — step 1 of the client wizard
|
|
34
|
+
- `POST /customers` — `customer.service.ts createCustomer`
|
|
35
|
+
|
|
36
|
+
An organisation with no role of its own has nothing to invite anybody with,
|
|
37
|
+
which is why the console's invite picker offers the ORG-LESS templates instead:
|
|
38
|
+
the shared documents that one console save took every client's modules away with.
|
|
39
|
+
|
|
40
|
+
Those three paths now seed the same two roles the paid path already does, from a
|
|
41
|
+
single definition in `utils/org-default-roles.util.ts`. `subscription.service.ts`
|
|
42
|
+
is unchanged.
|
|
43
|
+
|
|
44
|
+
**NEW ORGANISATIONS ONLY.** Nothing is backfilled, migrated or rewritten. The
|
|
45
|
+
helper is only ever handed an id that was inserted a moment earlier, and it
|
|
46
|
+
returns no roles at all when it is handed no organisation — so it cannot produce
|
|
47
|
+
another org-less shared template. Existing organisations, roles, members and
|
|
48
|
+
users are untouched, asserted byte-for-byte in
|
|
49
|
+
`test/e2e/org-default-roles.e2e.test.mjs`.
|
|
50
|
+
|
|
51
|
+
`["*"]` is deliberate: it means everything, so a new client is never locked out
|
|
52
|
+
of anything, and no per-vertical permission catalogue is mirrored server-side to
|
|
53
|
+
drift out of date with the frontend's.
|
|
54
|
+
|
|
55
|
+
Seeding never fails the request that created the organisation. The two
|
|
56
|
+
controller paths do not run in a transaction, so a failed role insert is logged
|
|
57
|
+
and the organisation is returned exactly as those endpoints returned it before
|
|
58
|
+
this change.
|
|
59
|
+
|
|
3
60
|
## 3.56.0
|
|
4
61
|
|
|
5
62
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -11713,7 +11713,7 @@ declare function MHidAmicoIdentity(value: THidAmicoIdentity): {
|
|
|
11713
11713
|
member: ObjectId | undefined;
|
|
11714
11714
|
serviceProvider: ObjectId | undefined;
|
|
11715
11715
|
visitor: ObjectId | undefined;
|
|
11716
|
-
type: "admin" | "resident" | "contractor" | "
|
|
11716
|
+
type: "admin" | "resident" | "contractor" | "unknown" | "visitor" | "staff";
|
|
11717
11717
|
status: "deleted" | "active" | "inactive";
|
|
11718
11718
|
metadata: Record<string, unknown>;
|
|
11719
11719
|
createdAt: string | Date;
|
|
@@ -11825,7 +11825,7 @@ declare function useHidAmicoRepo(): {
|
|
|
11825
11825
|
member: ObjectId | undefined;
|
|
11826
11826
|
serviceProvider: ObjectId | undefined;
|
|
11827
11827
|
visitor: ObjectId | undefined;
|
|
11828
|
-
type: "admin" | "resident" | "contractor" | "
|
|
11828
|
+
type: "admin" | "resident" | "contractor" | "unknown" | "visitor" | "staff";
|
|
11829
11829
|
status: "deleted" | "active" | "inactive";
|
|
11830
11830
|
metadata: Record<string, unknown>;
|
|
11831
11831
|
createdAt: string | Date;
|
|
@@ -12229,7 +12229,7 @@ declare function useHidAmicoService(): {
|
|
|
12229
12229
|
member: bson.ObjectId | undefined;
|
|
12230
12230
|
serviceProvider: bson.ObjectId | undefined;
|
|
12231
12231
|
visitor: bson.ObjectId | undefined;
|
|
12232
|
-
type: "admin" | "resident" | "contractor" | "
|
|
12232
|
+
type: "admin" | "resident" | "contractor" | "unknown" | "visitor" | "staff";
|
|
12233
12233
|
status: "deleted" | "active" | "inactive";
|
|
12234
12234
|
metadata: Record<string, unknown>;
|
|
12235
12235
|
createdAt: string | Date;
|