@7365admin1/core 3.56.0 → 3.57.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,45 @@
1
1
  # @iservice365/core
2
2
 
3
+ ## 3.57.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4b1f024: **A new client organisation is now created with its own owner roles.**
8
+
9
+ Measured on staging: of 195 live organisations, **74 hold not one role**, and not
10
+ one of those 74 has a subscription. The paid signup path
11
+ (`subscription.service.ts createOrgSubscription`) has always seeded two roles
12
+ named `owner` with `permissions: ["*"]`; the paths that actually create clients
13
+ today seeded nothing:
14
+
15
+ - `POST /organizations` — the Seven365 console creating a client
16
+ - `POST /organizations/onboarding` — step 1 of the client wizard
17
+ - `POST /customers` — `customer.service.ts createCustomer`
18
+
19
+ An organisation with no role of its own has nothing to invite anybody with,
20
+ which is why the console's invite picker offers the ORG-LESS templates instead:
21
+ the shared documents that one console save took every client's modules away with.
22
+
23
+ Those three paths now seed the same two roles the paid path already does, from a
24
+ single definition in `utils/org-default-roles.util.ts`. `subscription.service.ts`
25
+ is unchanged.
26
+
27
+ **NEW ORGANISATIONS ONLY.** Nothing is backfilled, migrated or rewritten. The
28
+ helper is only ever handed an id that was inserted a moment earlier, and it
29
+ returns no roles at all when it is handed no organisation — so it cannot produce
30
+ another org-less shared template. Existing organisations, roles, members and
31
+ users are untouched, asserted byte-for-byte in
32
+ `test/e2e/org-default-roles.e2e.test.mjs`.
33
+
34
+ `["*"]` is deliberate: it means everything, so a new client is never locked out
35
+ of anything, and no per-vertical permission catalogue is mirrored server-side to
36
+ drift out of date with the frontend's.
37
+
38
+ Seeding never fails the request that created the organisation. The two
39
+ controller paths do not run in a transaction, so a failed role insert is logged
40
+ and the organisation is returned exactly as those endpoints returned it before
41
+ this change.
42
+
3
43
  ## 3.56.0
4
44
 
5
45
  ### Minor Changes