Skip to content

Upgrade notes: an explicit "role": "reader" on POST /admin/users now grants read on every repository - #909

Merged
schmitch merged 1 commit into
mainfrom
claude/issue-755-reader-role-upgrade-notes
Nov 17, 2026
Merged

schmitch merged 1 commit into
mainfrom
claude/issue-755-reader-role-upgrade-notes

Conversation

@schmitch

Copy link
Copy Markdown
Member

Fixes #755

The 2.2.0 upgrade notes covered only a POST /admin/users request without role. A script or Terraform module written for 2.1 that creates a service account with an explicit "role": "reader" still succeeds on 2.2, and the account now holds the built-in reader role: read on every repository, private ones included.

Changes

  • docs/changes/2.2.0/755.upgrade.md (new): the upgrade note. An explicit "role": "reader" is the built-in reader role; scripts creating scoped service accounts send "role": "roles_only" or leave role out; 2.1 does not accept roles_only, so the change goes with the upgrade; PATCH /admin/users/{id} takes no role.
  • docs/deployment.md, Service accounts: the paragraph on the admin API says what reader grants and what it meant up to 2.1.

A fragment of its own rather than an amendment of 733.upgrade.md: docs/changes/README.md names a fragment after the issue the change fixes, so the entry links #755.

Checked against the code

  • 2.1 (v2.1.2, crates/server/src/admin/users.rs): AccessRole was reader (the default), writer, admin; Reader mapped to no built-in role, and the service-account form sent reader by default.
  • main: AccessRole::Reader maps to authz_dao::READER_ROLE; roles_only is the accepted value for no built-in role, and the default for a service account when role is absent.
  • Updating: UpdateUser (PATCH /admin/users/{id}) has active, description and realm only and rejects unknown fields, so the change applies to creating an account alone. Assigning the role reader by name through PUT /admin/users/{id}/roles is already covered by 822.upgrade.md.

Not done here

The issue's optional part, POST /admin/users refusing reader for a service account for one release without an explicit opt-in, is a behaviour change and is left out of this documentation fix.

No web UI change: the admin API is unchanged.


Generated by Claude Code

…he built-in reader role (#755)

In 2.1 `reader` meant no built-in role, and scripts creating scoped
service accounts sent it. Say so in the 2.2.0 upgrade notes and in the
service-account section of the deployment guide, and name `roles_only`
as the value to send.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012e6DJbv51Ww65TPMmVAXU7
@schmitch
schmitch added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 5f31bcb Nov 17, 2026
18 checks passed
@schmitch
schmitch deleted the claude/issue-755-reader-role-upgrade-notes branch November 17, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin users API: an explicit "role": "reader" now gives a service account read on every repository, and the upgrade notes do not say so

2 participants