@openinc/parse-server-opendash 4.17.0 → 4.17.1
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/dist/hooks/Service_Ticket.js +11 -2
- package/package.json +1 -1
|
@@ -237,8 +237,15 @@ async function nextTenantTicketNumber(tenant) {
|
|
|
237
237
|
}
|
|
238
238
|
/** Pointer fields on a ticket that must belong to the ticket's own tenant. */
|
|
239
239
|
const TENANT_SCOPED_POINTERS = ["status", "project", "equipment"];
|
|
240
|
-
/**
|
|
241
|
-
|
|
240
|
+
/**
|
|
241
|
+
* Pointer-array fields whose entries must belong to the ticket's own tenant.
|
|
242
|
+
*
|
|
243
|
+
* Not `assignedUsers`: people work across tenants — a customer assigns the
|
|
244
|
+
* service provider's staff to its tickets — so an assignee of another tenant
|
|
245
|
+
* is legitimate. Who can be picked is what the assigner may read; the ticket
|
|
246
|
+
* ACL then grants the assignee access.
|
|
247
|
+
*/
|
|
248
|
+
const TENANT_SCOPED_POINTER_ARRAYS = ["tags"];
|
|
242
249
|
/**
|
|
243
250
|
* Shadow columns the ticket carries so the table can sort by a pointer.
|
|
244
251
|
*
|
|
@@ -335,6 +342,8 @@ async function loadReferencedRows(object) {
|
|
|
335
342
|
*
|
|
336
343
|
* `assignedRoles` is deliberately not checked: `_Role` has no tenant column at
|
|
337
344
|
* all — a role's tenant lives in its name — so there is nothing to compare.
|
|
345
|
+
* Nor is `assignedUsers` (see {@link TENANT_SCOPED_POINTER_ARRAYS}): people are
|
|
346
|
+
* not master data of one tenant.
|
|
338
347
|
*/
|
|
339
348
|
function assertSameTenantReferences(object, rows) {
|
|
340
349
|
const tenantId = object.get("tenant")?.id;
|