Skip to content

Upgrade notes: a request naming the role reader gets the built-in one - #827

Merged
schmitch merged 1 commit into
mainfrom
claude/relaxed-cerf-xsoepb
Nov 3, 2026
Merged

schmitch merged 1 commit into
mainfrom
claude/relaxed-cerf-xsoepb

Conversation

@schmitch

@schmitch schmitch commented Nov 3, 2026

Copy link
Copy Markdown
Member

Fixes #822

Migration 0013 renames a role that an administrator named reader to reader-<id>, then creates the built-in reader, which reads every repository. The admin API resolves a role given by name at request time (resolve_role_id in crates/server/src/admin/user_roles.rs → authz_dao::role_id_by_name). So a 2.1 script that sends PUT /admin/users/{id}/roles {"role": "reader"} now gives its accounts read on every repository, and the request succeeds. 733.upgrade.md covers the rename but not this effect.

This adds docs/changes/2.2.0/822.upgrade.md. The note says:

  • A request that names reader gets the built-in role. This includes a script that looks the id up by name in GET /admin/roles.
  • POST /admin/roles with the name reader now answers 409. A script that reads that 409 as "the role exists" then goes on with the built-in role.
  • What to do: before the upgrade, pass the role's role_id, which the upgrade keeps. After it, name reader-<id> instead.
  • Where to find the renamed role: GET /admin/roles or Admin → Roles.

The other role-by-name lookups don't need a note:

Docs only; no code changes. #822 moved from milestone 2.3.0 to 2.2.0 and carries release blocker.

Checks

  • cargo xtask changelog --check: 54 fragments, all for milestones after 2.1.0.

Generated by Claude Code

Migration 0013 renames an administrator's role `reader` to `reader-<id>`
and creates the built-in `reader`, which reads every repository. The admin
API resolves a role given by name at request time, so a 2.1 script that
assigns `{"role": "reader"}` now gives its accounts read on every
repository without an error. Say so in the 2.2.0 upgrade notes, with the
409 a script creating the role now meets, and how to find the renamed
role.

Fixes #822

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012e6DJbzZtA6Cmowfnd4LLw
@schmitch
schmitch added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 5f025cc Nov 3, 2026
18 checks passed
@schmitch
schmitch deleted the claude/relaxed-cerf-xsoepb branch November 3, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants