@rubytech/create-siteoffice-code 0.1.263 → 0.1.264
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
|
@@ -4915,8 +4915,16 @@ async function writeAdminUserAndPerson(params) {
|
|
|
4915
4915
|
try {
|
|
4916
4916
|
const result = await session.run(
|
|
4917
4917
|
`MERGE (au:AdminUser {userId: $userId})
|
|
4918
|
-
|
|
4919
|
-
|
|
4918
|
+
// Task 669 \u2014 stamp accountId/role at creation so the account-scoped
|
|
4919
|
+
// graph-write gate (MATCH (au:AdminUser {accountId:$accountId})) matches
|
|
4920
|
+
// on the operator's first memory write. Mirrors seed-neo4j.sh:175-181
|
|
4921
|
+
// and the sibling writers (neo4j-store.ts:537,:931). COALESCE on MATCH
|
|
4922
|
+
// preserves an already-stamped node.
|
|
4923
|
+
ON CREATE SET au.name = $fullName, au.createdAt = $now,
|
|
4924
|
+
au.accountId = $accountId, au.role = 'owner'
|
|
4925
|
+
ON MATCH SET au.name = $fullName, au.updatedAt = $now,
|
|
4926
|
+
au.accountId = COALESCE(au.accountId, $accountId),
|
|
4927
|
+
au.role = COALESCE(au.role, 'owner')
|
|
4920
4928
|
WITH au
|
|
4921
4929
|
|
|
4922
4930
|
// Case-insensitive Person reuse: same accountId, same givenName, same familyName
|