The userId in a SiteAccess record points to the specific User who has been granted a role on this site. When a project manager adds a geologist to a site, the system creates a SiteAccess row with the geologist's userId, the site's siteId, and the appropriate role. Removing site access means deleting or inactivating that SiteAccess record. The userId matches the User model's id field within the same tenant.
Technical section
Data model, API, and internals — visible to developers.
