Adventure Labs Logo
Scout Docs

Users_roles_per_herd

Table for storing user role assignments per herd with role-based access control

Column NameData TypeConstraints
idbigintNOT NULL
inserted_attimestamp with time zoneDEFAULT timezone('utc'::text, now()) NOT NULL
user_iduuidNOT NULL
herd_idbigintNOT NULL
rolepublic.roleNOT NULL

Security Policies (RLS)

This table has Row Level Security (RLS) enabled with the following policies:

  • Read Access: Users can view their own role assignments OR users with admin role in same herd
  • Create/Update/Delete: Users with admin role in same herd only

On this page