@7365admin1/core 3.61.0 → 3.62.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 +11 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +4573 -4488
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4573 -4488
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/test/backfill-org-owner-roles.test.mjs +25 -11
- package/test/console-permission.test.mjs +37 -5
- package/test/org-default-roles.test.mjs +82 -39
- package/test/org-modules.test.mjs +162 -0
- package/test/org-role-selfheal.test.mjs +24 -16
- package/test/repair-client-template-permissions.test.mjs +331 -0
- package/test/staff-console-authz.test.mjs +22 -2
- package/tools/backfill-org-owner-roles/backfill.mjs +32 -2
- package/tools/repair-client-template-permissions/devtools-snippet.js +163 -0
- package/tools/repair-client-template-permissions/repair.mjs +329 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @iservice365/core
|
|
2
2
|
|
|
3
|
+
## 3.62.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2ff23f3: Seed an "Administrator" role alongside the two owner roles when an organisation is created, so a client has a role it can actually give a colleague on day one. Its thirteen permissions are the people-management cluster 73-82% of live client roles already carry (members, invitations, roles). The paid signup path now uses the same shared helper instead of describing its two roles inline.
|
|
8
|
+
- 8d75fe0: Add `organizations.modules` — the catalogue modules Seven365 has enabled for a client — with a staff-gated `updateModules` handler and a console audit row. Absent and empty both mean EVERYTHING, and the helper fails open on anything it cannot read, so no existing organisation changes. It narrows what a role editor OFFERS and authorises nothing.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- b0c9f27: Publishing the platform Terms and Privacy Policy is now restricted to the Seven365 OWNER, not any staff account. Owner decision 9 said owner-only; the suspend half was built and this half was not, and because an empty permission list passes every console grant, any staff role that had never been ticked could publish Terms binding every client.
|
|
13
|
+
|
|
3
14
|
## 3.61.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -716,6 +716,17 @@ type TOrg = {
|
|
|
716
716
|
description?: string;
|
|
717
717
|
type: string;
|
|
718
718
|
nature: string;
|
|
719
|
+
/**
|
|
720
|
+
* The catalogue module keys Seven365 has enabled for this client, or absent.
|
|
721
|
+
*
|
|
722
|
+
* ABSENT AND EMPTY BOTH MEAN EVERYTHING - see `org-modules.util.ts`. Every
|
|
723
|
+
* organisation that exists today has no such field, so any other reading of
|
|
724
|
+
* absent would empty the role catalogue for all of them on deploy.
|
|
725
|
+
*
|
|
726
|
+
* It DRAWS, it does not AUTHORISE. Nothing on the server reads it to decide a
|
|
727
|
+
* request; it narrows what a role editor OFFERS.
|
|
728
|
+
*/
|
|
729
|
+
modules?: string[];
|
|
719
730
|
email?: string;
|
|
720
731
|
contact?: string;
|
|
721
732
|
/** Chosen by the owner while creating the organisation. */
|
|
@@ -817,6 +828,7 @@ declare function useOrgController(): {
|
|
|
817
828
|
getOrgsByEmail: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
818
829
|
getAdminOrgForResident: (_req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
819
830
|
updateStatus: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
831
|
+
updateModules: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
820
832
|
};
|
|
821
833
|
|
|
822
834
|
/**
|
|
@@ -12988,6 +13000,15 @@ declare enum ConsoleAuditAction {
|
|
|
12988
13000
|
CLIENT_CREATED = "client.created",
|
|
12989
13001
|
CLIENT_SUSPENDED = "client.suspended",
|
|
12990
13002
|
CLIENT_REACTIVATED = "client.reactivated",
|
|
13003
|
+
/**
|
|
13004
|
+
* Seven365 staff changing which catalogue modules a client is offered.
|
|
13005
|
+
*
|
|
13006
|
+
* Recorded because it is a commercial decision about a paying client that
|
|
13007
|
+
* somebody has to be able to answer for later, even though it grants and
|
|
13008
|
+
* revokes nothing by itself (`org-modules.util.ts` - it narrows what a role
|
|
13009
|
+
* editor OFFERS, and the server re-decides every request regardless).
|
|
13010
|
+
*/
|
|
13011
|
+
CLIENT_MODULES_CHANGED = "client.modules-changed",
|
|
12991
13012
|
PROMO_CODE_CREATED = "promo-code.created",
|
|
12992
13013
|
PROMO_CODE_UPDATED = "promo-code.updated",
|
|
12993
13014
|
PROMO_CODE_STATUS_CHANGED = "promo-code.status-changed",
|