Commit 84d00ae
Fix event creation denied by private-key rule
The new event creation batched the project doc and its
private/integration API-key doc together. The private-doc create rule
does get(project) (isAdmin), which in a batch evaluates against
pre-commit state where the project doc does not exist yet, so the get
errors and the write is denied (PERMISSION_DENIED at the /private rule).
Write sequentially instead: create the project doc, then the private
key doc. By then get(project) resolves and the owner check passes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 5c7f76b commit 84d00ae
1 file changed
Lines changed: 13 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 60 | | |
64 | | - | |
65 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| |||
0 commit comments