Commit 902f4f4
committed
fix(V2): block staged mutations of records with unresolvable owner
The ownership guard waved through UPDATE/DELETE staging for an existing
record whenever no owner could be resolved, even on tables that carry an
org_uid column (program, methodology, project, unit, stakeholder, label,
aef_t1_submission). A row with a null org_uid could therefore be mutated
despite the home-org-only policy.
Require an owner when the model defines an org_uid column, so an
unresolvable owner is rejected. Home-created records carry org_uid=home
and still pass; tables without an org_uid column keep resolving ownership
through their parent FK chain.1 parent 95792e4 commit 902f4f4
1 file changed
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
217 | 230 | | |
218 | 231 | | |
219 | 232 | | |
| |||
364 | 377 | | |
365 | 378 | | |
366 | 379 | | |
367 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
368 | 383 | | |
369 | 384 | | |
370 | 385 | | |
371 | | - | |
| 386 | + | |
372 | 387 | | |
373 | 388 | | |
374 | 389 | | |
| |||
0 commit comments