app.record_grants
TableRow level security on
Access to an org, workspace, team, project or record granted to a person or another organization with scope and expiry, for example a standing partner grant (Section 4.6.1).
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Grant id. |
| org_id | uuid | No | Org that owns the target, derived from it by private.scope_org.References app.organizations.id |
| target_kind | app.grant_target_kind | No | Kind of target. |
| target_id | uuid | No | Target row id. |
| capability_code | text | No | Capability the grant allows on the target.References app.capabilities.code |
| grantee_person_id | uuid | Yes | Person who receives access; null when an organization does.References app.people.id |
| grantee_org_id | uuid | Yes | Organization whose active members receive access; null when a person does.References app.organizations.id |
| valid_from | timestamp with time zone | No | When access starts. |
| valid_to | timestamp with time zone | No | When access ends. Record grants always expire. |
| granted_by | uuid | Yes | Person who granted it; never the grantee.References app.people.id |
| reason | text | No | Why the grant was made, for example the partner agreement clause. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |