@7365admin1/core 3.72.1-staging.321 → 3.72.1-staging.322

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@7365admin1/core",
3
3
  "license": "MIT",
4
- "version": "3.72.1-staging.321",
4
+ "version": "3.72.1-staging.322",
5
5
  "author": "7365admin1",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",
@@ -24,6 +24,7 @@ const PM_CLIENT = "pm-cis@e2e.example.com";
24
24
  const RED_CLIENT = "red-cis@e2e.example.com";
25
25
 
26
26
  const MODULES = ["visitor-mgmt", "members", "roles", "invitations", "sites"];
27
+ const RED_OWNER = ["visitor-mgmt:view-visitors", "members:view-members"];
27
28
 
28
29
  // Every switch explicit, the way the form sends them.
29
30
  const RESIDENT_APP = {
@@ -97,12 +98,19 @@ describe("Invite Client gives a Property Management client its Service365 module
97
98
  });
98
99
 
99
100
  it("a real estate developer gets the same Property Management set", async () => {
100
- const res = await invite(STAFF, { email: RED_CLIENT, app: ["real_estate_developer"], modules: MODULES, residentAppModules: RESIDENT_APP });
101
+ // Owner, 2026-09-15: Invite Client now offers Real Estate Developer, with the
102
+ // owner role chosen from the Property Management catalogue like a PM client.
103
+ const res = await invite(STAFF, { email: RED_CLIENT, app: ["real_estate_developer"], modules: MODULES, permissions: RED_OWNER, residentAppModules: RESIDENT_APP });
101
104
  assert.equal(res.status, 201, JSON.stringify(res.body));
102
105
  const made = await onboard(RED_CLIENT, "CIS Developer Client", "real_estate_developer");
103
106
  assert.equal(made.status, 201, JSON.stringify(made.body));
104
107
  const org = await h.db.collection("organizations").findOne({ name: "CIS Developer Client" });
105
108
  assert.deepEqual(org.residentAppModules, RESIDENT_APP);
109
+ assert.deepEqual(org.modules, MODULES);
110
+ const owner = await h.db.collection("roles").findOne({ _id: org.invitedRole });
111
+ assert.ok(owner, "the chosen owner role is recorded on the organisation");
112
+ assert.equal(owner.type, "real_estate_developer");
113
+ assert.deepEqual([...owner.permissions].sort(), [...RED_OWNER].sort());
106
114
  });
107
115
  });
108
116