You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 47fe789
Browse filesBrowse the repository at this point in the historyBrowse files
fix(core): the managed write clamp lowers modifyAllRecords and clears transfer where the guard refuses the update
clampManagedObjectWrites cleared allowEdit/allowCreate/allowDelete on a
guarded managed object that does not opt the verb in, but left
modifyAllRecords (which grants edit, delete and transfer on its own) and
allowTransfer (an owner change is an update). It now lowers
modifyAllRecords to viewAllRecords plus the plain bit of each verb the
object still opts in, through one helper shared with the external write
clamp, and clears allowTransfer unless edit is opted in.
Claude-Session: https://claude.ai/code/session_01Utp6CZUqByp4kJMhCQDWZ2
Co-authored-by: Claude <noreply@anthropic.com>
fix(core): effective object permissions on a guarded managed object grant no edit, delete or transfer the write guard refuses, `modifyAllRecords` included
6
+
7
+
Clause-②: yes (widening)
8
+
Metadata-protocol: none
9
+
10
+
The managed write clamp behind `/auth/me/permissions` and `ISecurityService.getEffectiveObjectPermissions` cleared `allowEdit`, `allowCreate` and `allowDelete` on an object in a guarded `managedBy` bucket (`better-auth`, `engine-owned`, `append-only`) that does not opt the verb in through `userActions`, but left two grants the write guard refuses:
11
+
12
+
-**`modifyAllRecords`**, which grants edit, delete and transfer on its own. A permission set naming such an object with `{ modifyAllRecords: true }` made `current_user.can(object, 'edit' | 'delete' | 'transfer')` answer `true` while every one of those writes was refused. It is now lowered to `viewAllRecords` (the read it implies, so read is unchanged), and each verb the object still opts in is kept as its plain bit: an object opting `edit` in keeps edit and transfer and loses delete. An object opting both `edit` and `delete` in keeps `modifyAllRecords`.
13
+
-**`allowTransfer`**, which now follows `edit`: an owner change is an update, refused unless `edit` is opted in. This also corrects a super-user wildcard admin, who was answered `can(object, 'transfer')``true` on every guarded object.
14
+
15
+
No write changes: the guard refused each of these before and still does. Only the served capability answer, and the console buttons that read it, now match it.
0 commit comments