Phase 2: multi-user links for machines (Convex schema + mutations + admin API); UI to add/remove links; user editor lists machines via linkedUsers

This commit is contained in:
codex-bot 2025-10-21 11:06:21 -03:00
parent 6653ef250e
commit 22f0768492
5 changed files with 208 additions and 10 deletions

View file

@ -426,7 +426,10 @@ export function AdminUsersManager({ initialUsers, initialInvites, roleOptions, d
if (typeof base.email === "string") collaboratorEmail = base.email.toLowerCase()
}
}
if (assigned === email || (collaboratorEmail && collaboratorEmail === email)) {
const linked = Array.isArray((m as any).linkedUsers)
? ((m as any).linkedUsers as Array<{ email?: string }>).some((lu) => (lu.email ?? '').toLowerCase() === email)
: false
if (assigned === email || (collaboratorEmail && collaboratorEmail === email) || linked) {
results.push({ id: m.id, hostname: m.hostname })
}
})