8000 Document the roster rule as the token rule it is by ynishi · Pull Request #20 · ynishi/evalhub · GitHub
[go: up one dir, main page]

Skip to content

Document the roster rule as the token rule it is - #20

Merged
ynishi merged 1 commit into
mainfrom
chore/org-script
Sep 23, 2026
Merged

ynishi merged 1 commit into
mainfrom
chore/org-script

Conversation

@ynishi
@ynishi ynishi commented Sep 23, 2026 •
Copy link
Copy Markdown
Owner

Closes #18.

The roster rule, documented

GET /orgs/{org}/members asks what the presented token covers, like every other read: a member whose token does not name the organisation is answered 403. So the token that creates an organisation cannot read its members until a second token names it.

Four places said membership was enough — the module doc's endpoint table, the handler's comment, /openapi.json and the README's endpoint table. All four were true about the role and silent about the token, which is the half that answers 403. They now say that the presented token must name the organisation, and the module doc gains the paragraph that separates the roster rule from the POST /tokens rule above it.

That is a comment-only change with one visible edge: the operation's description in the contract. crates/evalhub-server/tests/snapshots/boot__openapi.snap and web/src/lib/api/schema.d.ts are regenerated here, one line each.

docs/hosting.md

A new section, An organisation: made in the UI, in two steps — Settings creates it, then Settings issues a token that names it — with why the second step is needed and what write and admin buy.

An earlier revision of this branch added deploy/fly/org.sh for the same two steps. It was dropped: it calls only the public API, nothing Fly-specific, so it does not belong beside up.sh / down.sh / user.sh, and it duplicates what the UI does. The UI's dead end after creating an organisation is #19.

Verification

cargo fmt --check, cargo clippy -p evalhub-server --all-targets -- -D warnings, cargo test -p evalhub-server --test boot (the snapshot test). The rest of cargo test -p evalhub-server was not run here. web/ changes only the generated schema.d.ts comment.

GET /orgs/{org}/members asks what the presented token covers, like
every other read, so a member whose token does not name the
organisation is answered 403. The docs said membership was enough in
four places -- the module table, the handler comment, the OpenAPI
description and the README's endpoint table -- which makes the 403 an
admin meets right after creating an organisation look like a bug
rather than the rule. They now say the presented token must name the
organisation, and the module doc separates the roster rule from the
POST /tokens rule above it.

The description is part of the contract, so the server snapshot and
the generated client move with it, one line each.

docs/hosting.md gains a section on making an organisation: it is done
in the UI, in two steps (create it, then issue a token that names it),
and says why the second step is needed.

Signed-off-by: Yutaka Nishimura <ytk.nishimura@gmail.com>
@ynishi ynishi changed the title Hosting: one script for an organisation and the token that writes in it Document the roster rule as the token rule it is Sep 23, 2026
@ynishi
ynishi merged commit d5793a9 into main Sep 23, 2026
4 checks passed
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.

The roster rule is documented as membership, so the 403 after creating an organisation reads as a bug

1 participant

0