A save of the role dataset now checks who may save before it compares expected_revision.
Before: someone without the right to save (B7: management or document owner; Q3: CXO until management exists) who sent a stale revision got 409 revision_conflict. The portal shows that as "Inzwischen hat jemand anderes etwas geändert". After a reload they got 403 not_permitted. This was seen in the R1 S0 stage check: an IT admin on an outdated page.
After:
That person gets 403 not_permitted straight away.
Someone who may save still gets 409 on a stale revision.
The CXO first-entry rule (bootstrap_only) is still checked in Prepare, after the revision check, because it looks at what the save changes.
Changes:
roles.MayWrite(current, writer): the who-may-save part of Prepare, which now calls it.
server/role_dataset.go: calls MayWrite before the revision comparison.
Test: staff and a late CXO, both with a stale revision, get not_permitted.
No migration, no API shape change, no catalogue change. Checks: go vet, go test ./... pass locally.
A save of the role dataset now checks who may save before it compares `expected_revision`.
**Before:** someone without the right to save (B7: management or document owner; Q3: CXO until management exists) who sent a stale revision got `409 revision_conflict`. The portal shows that as "Inzwischen hat jemand anderes etwas geändert". After a reload they got `403 not_permitted`. This was seen in the R1 S0 stage check: an IT admin on an outdated page.
**After:**
- That person gets `403 not_permitted` straight away.
- Someone who may save still gets `409` on a stale revision.
- The CXO first-entry rule (`bootstrap_only`) is still checked in `Prepare`, after the revision check, because it looks at what the save changes.
Changes:
- `roles.MayWrite(current, writer)`: the who-may-save part of `Prepare`, which now calls it.
- `server/role_dataset.go`: calls `MayWrite` before the revision comparison.
- Test: staff and a late CXO, both with a stale revision, get `not_permitted`.
No migration, no API shape change, no catalogue change. Checks: `go vet`, `go test ./...` pass locally.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
A person who may not save the role dataset and sent a stale revision got
409 revision_conflict ("someone else changed it") instead of 403
not_permitted. MayWrite now runs before the revision check; Prepare uses
it too. Found in the R1 S0 stage check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
sharang
merged commit cb173104b6 into main2026-10-28 12:00:46 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
A save of the role dataset now checks who may save before it compares
expected_revision.Before: someone without the right to save (B7: management or document owner; Q3: CXO until management exists) who sent a stale revision got
409 revision_conflict. The portal shows that as "Inzwischen hat jemand anderes etwas geändert". After a reload they got403 not_permitted. This was seen in the R1 S0 stage check: an IT admin on an outdated page.After:
403 not_permittedstraight away.409on a stale revision.bootstrap_only) is still checked inPrepare, after the revision check, because it looks at what the save changes.Changes:
roles.MayWrite(current, writer): the who-may-save part ofPrepare, which now calls it.server/role_dataset.go: callsMayWritebefore the revision comparison.not_permitted.No migration, no API shape change, no catalogue change. Checks:
go vet,go test ./...pass locally.🤖 Generated with Claude Code
https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
A person who may not save the role dataset and sent a stale revision got 409 revision_conflict ("someone else changed it") instead of 403 not_permitted. MayWrite now runs before the revision check; Prepare uses it too. Found in the R1 S0 stage check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf