Associations · Permissions
1 module · 4 exports · 1 repository · 4 e2e tests · 2 routes
Who may do what in Associations: the per-object permissions it builds with every place checking them, and the checks in its code. See Permissions for how authorization works and the reference for every role and feature.
Granted here
Built at read time into what the functions return, a list of the user ids holding each permission. Checks are listed wherever they are, other features' included.
| Permission | Granted by | Checked in |
|---|---|---|
REMOVE |
| Serverassociations.server.ts Clientassociations.tsx |
MANAGE |
| Clientassociations.tsx read directly associations.server.ts |
MANAGE_INVITE_LINK |
| read directly associations.server.ts |
Global roles
The global roles this feature's code checks, see who has each.
| Role | Checked in |
|---|---|
SUPPORTER | Serverassociations.server.ts |
Outside the system
Reading x.permissions.NAME directly skips hasPermission and with it the admin bypass, and authorizing an action on an object with isAdmin and friends is a bug. Some of these are deliberate, the permissions doc lists the boundaries.
- read directly in app/features/associations/actions/associations.server.ts:111
const isAdmin = association.permissions.MANAGE.includes(user.id); - read directly in app/features/associations/loaders/associations.server.ts:21
inviteCode: association.permissions.MANAGE_INVITE_LINK.includes(user.id)