Skip to content

Commit 9f62e06

Browse files
committed
docs(changeset): reaction take-back through the unreact door
Claude-Session: https://claude.ai/code/session_01ADHkmPysaCwFvT4Pqb88z8 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5a10761 commit 9f62e06

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/core': patch
4+
---
5+
6+
fix(app-shell): a member takes back their own comment reaction through the unreact door, with no object delete grant
7+
8+
A member whose grants are the every-member ones could add a reaction on the record feed and never take it back. The reaction chip removed through the generic data door's `DELETE /api/v1/data/sys_comment_reaction/:id`, which needs an object-level `delete` grant that no every-member set may carry (ADR-0090 D5), and the `feedReactionRemove` row of the affordance-to-grant map read that grant, so the chip offered no take-back at all.
9+
10+
Clause-②: no
11+
Metadata-protocol: none
12+
13+
- The record page now removes the caller's own reaction row through the unreact door, `DELETE /api/v1/comments/reactions/:id`, which `@objectstack/plugin-audit` mounts. The door removes only the caller's own row; a refused take-back puts the reaction back on screen and says it was not saved, as before.
14+
- `feedReactionRemove` in `@object-ui/core`'s `AFFORDANCE_GRANTS` now reads `{ crud: null, grant: 'create' }`: its write no longer goes through the data door, so no CRUD bit is read, and it asks the grant the reaction was added under. Whose reaction a chip shows still decides which chips offer the take-back: a click on another member's reaction adds the caller's own.
15+
- A member who holds the `delete` grant sees the same behaviour: the take-back goes through the same door.

‎ui/content/docs/plugins/plugin-detail.mdx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,10 @@ Three sources, in precedence order:
222222
hands each handler over only where the caller may make that write
223223
(objectui#12082): the composer and the reply input need the **create** grant
224224
on `sys_comment`; the reaction control needs the **create** grant on
225-
`sys_comment_reaction`, and taking a reaction back its **delete** grant; on a
225+
`sys_comment_reaction`, and taking the caller's own reaction back needs the
226+
same grant: it goes through the unreact door
227+
(`DELETE /api/v1/comments/reactions/:id`), which removes only the caller's
228+
own row and asks no **delete** grant. On a
226229
deployment with no `sys_comment_reaction` the control needs the **update**
227230
grant on `sys_comment`. These are the `feedComment`, `feedReactionAdd`,
228231
`feedReactionRemove` and `feedReactionColumn` rows of the affordance-to-grant

0 commit comments

Comments
 (0)