@7365admin1/core 3.99.1-staging.385 → 3.99.1-staging.387
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/.changeset/assign-role-owner-guard.md +5 -0
- package/.changeset/hid-sip-account-list-site-scope.md +23 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1144 -1061
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1141 -1058
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/test/e2e/assign-role-owner.e2e.test.mjs +149 -0
- package/test/e2e/harness.mjs +1 -0
- package/test/member-role-assign.test.mjs +68 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Assign Role works for every organisation: the "last owner" check runs only when demoting a member who holds an owner ("*") role, instead of refusing every change with "No owner role found." when the organisation stores no owner role of that app. The assigned role must be the organisation's own active role for the member's site (or org-wide); the caller needs `members:assign-member-role` (or "*", or is the org owner / Seven365 staff). Member list rows carry `roleState` (ok / template / deleted / other-org / missing).
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Scope the HID SIP account list to the site alone.
|
|
6
|
+
|
|
7
|
+
`GET /sites/:siteId/intercom/sip-accounts` required an `orgId` query parameter
|
|
8
|
+
and filtered the accounts by it. That organisation never decided access — the
|
|
9
|
+
handler's `authorizeSite` resolves the caller's right to the site from their
|
|
10
|
+
own memberships — so all `orgId` did was narrow the rows, and it did so wrongly
|
|
11
|
+
in two places:
|
|
12
|
+
|
|
13
|
+
- a screen mounted without an organisation in scope could not call the endpoint
|
|
14
|
+
at all, leaving the intercom contact dialog with an empty name picker;
|
|
15
|
+
- on a customer site, accounts provisioned by a managing agent carry that
|
|
16
|
+
agent's `orgId`, so the site's own operators could not see them — although
|
|
17
|
+
the door station behind the contact list rings those people regardless.
|
|
18
|
+
|
|
19
|
+
`listSipAccounts` now takes only `siteId`, both in the service and the
|
|
20
|
+
repository, and the controller no longer validates the query. An older client
|
|
21
|
+
that still sends `orgId` is ignored rather than refused, so the endpoint stays
|
|
22
|
+
backward compatible. `ensureSipAccount` is unchanged: it provisions an account
|
|
23
|
+
and still records the organisation it was created under.
|
package/dist/index.d.ts
CHANGED
|
@@ -17140,7 +17140,7 @@ declare function useHidAmicoRepo(): {
|
|
|
17140
17140
|
pageRange: string;
|
|
17141
17141
|
}>;
|
|
17142
17142
|
getSipAccount: (orgIdValue: string | ObjectId, siteValue: string | ObjectId, userValue: string | ObjectId) => Promise<mongodb.WithId<bson.Document> | null>;
|
|
17143
|
-
listSipAccounts: (
|
|
17143
|
+
listSipAccounts: (siteValue: string | ObjectId) => Promise<{
|
|
17144
17144
|
_id: string;
|
|
17145
17145
|
userId: string;
|
|
17146
17146
|
name: string;
|
|
@@ -17870,7 +17870,7 @@ declare function useHidAmicoService(): {
|
|
|
17870
17870
|
status: "active" | "failed" | "disabled" | "provisioning" | undefined;
|
|
17871
17871
|
provisionedAt: string | Date;
|
|
17872
17872
|
}>;
|
|
17873
|
-
listSipAccounts: (
|
|
17873
|
+
listSipAccounts: (siteId: string) => Promise<{
|
|
17874
17874
|
_id: string;
|
|
17875
17875
|
userId: string;
|
|
17876
17876
|
name: string;
|