User
A User is an authenticated person. Every user belongs to exactly one organisation and carries a single role string that governs what they can reach.
Purpose
Section titled “Purpose”Users are the identity record behind every request. Most sign in through WorkOS SSO and are matched by workos_id; investors and a small number of password users sign in with a hashed password instead, flagged by uses_password_auth. The model also carries investor-specific fields (shareholding, address, investment dates) used by the investor pages, and implements Filament’s FilamentUser and HasAvatar contracts to gate and decorate the admin panel.
Users are resolved on every authenticated request and used across auth, profile and admin flows.
app/Http/Controllers/Auth/AuthCallbackController.php— creates or updates the user from the WorkOS callback.app/Http/Middleware/HandleInertiaRequests.php— sharesauth.user,auth.organizationandauth.permissionswith React.app/Http/Controllers/PeoplePermissions/— the people and permissions page and profile updates.app/Http/Controllers/Investors/InvestorsController.php— reads the investor fields.app/Filament/Resources/UserResource.php— staff administration.app/Observers/UserObserver.php— attached via#[ObservedBy].
Relationships
Section titled “Relationships”| Relation | Type | Related model |
|---|---|---|
organization |
belongsTo |
Organization |
avatar |
belongsTo |
Attachment |
visibleAttachments |
belongsToMany |
Attachment |
stakeholderProjects |
hasMany |
Project |
contactForOrganizations |
hasMany |
Organization |
agentSessions |
hasMany |
AgentSession |
createdConfigurationResources |
hasMany |
ConfigurationResource |
updatedConfigurationResources |
hasMany |
ConfigurationResource |
visibleAttachments uses the attachment_user pivot and lists attachments explicitly restricted to this user as a permitted viewer.
Data shape
Section titled “Data shape”Table users. Primary key is a UUID (HasUuids).
Identity and access
Section titled “Identity and access”| Column | Type | Notes |
|---|---|---|
id |
uuid |
Primary key |
name |
string |
Display name |
email |
string |
Login address |
workos_id |
string |
Nullable, hidden from serialisation |
password |
string |
Nullable, hashed cast, hidden |
uses_password_auth |
boolean |
Defaults to false |
role |
string |
See values below |
organization_id |
uuid |
FK to organizations, required |
avatar_id |
uuid |
Nullable, FK to attachments |
created_at, updated_at |
datetime |
Timestamps |
Profile
Section titled “Profile”| Column | Type | Notes |
|---|---|---|
department |
string |
Nullable |
position |
string |
Nullable, not mass assignable |
phone |
string |
Nullable, not mass assignable |
address_line_1 |
string |
Nullable |
address_line_2 |
string |
Nullable |
city |
string |
Nullable |
postcode |
string |
Nullable |
country |
string |
Nullable |
Investor fields
Section titled “Investor fields”| Column | Type | Notes |
|---|---|---|
investor_since |
date |
Nullable, cast to date |
last_investment_at |
date |
Nullable, cast to date |
shares |
integer |
Nullable, cast to integer |
share_class |
string |
Nullable |
Known role values are org-inbeta-staff and root (both satisfy isStaff() and unlock the Filament panel at /admin) and investor (always treated as a password user by usesPasswordAuth()).