8000 Organisation page: say why the roster is missing, and offer only the controls the hub accepts by ynishi · Pull Request #21 · ynishi/evalhub · GitHub
[go: up one dir, main page]

Skip to content

Organisation page: say why the roster is missing, and offer only the controls the hub accepts - #21

Merged
ynishi merged 1 commit into
mainfrom
fix/org-page-dead-end
Sep 23, 2026
Merged

ynishi merged 1 commit into
mainfrom
fix/org-page-dead-end

Conversation

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

Closes #19.

UI only; no API change.

The empty page after creating an organisation

The token in use was issued before the organisation existed, so it does not name it, and GET /orgs/{org}/members answers 403 to it. /ns/{org} rendered nothing in that case. It now says, for a signed-in token that does not name the organisation: its members are not shown, a member sees them with a token that names it, and a link to /settings?ns={org} issues one. The line is the same for a member and a stranger — it says what a token needs, not who is in the organisation. An anonymous visitor sees what they saw before.

No typing of the slug

Settings fills the "Issue a token" namespaces field with <login>, <org> in two places: right after creating an organisation on the same screen, and when arriving from the link above (?ns=). The success notice no longer says "Manage members on its page"; it says the current token does not name the organisation, that the form is filled in, and that managing members takes an admin token.

Member controls only where the hub accepts them

canManage was members !== null && session.mayWrite(ns), so a write token naming the organisation got the add form and the remove buttons, which add_member / remove_member answer with 403 (they ask admin on the organisation: the lesser of the token's scope and the caller's role). They now appear only when the token's scope is admin and the caller's row in the roster is admin. Everyone else sees the roster and a line saying what managing it takes.

Verification

just web-check (svelte-check 0 errors, prettier clean) and just e2e: 18 passed, 0 failed, including the browser suite (5 passed). web/tests/browser/orgs.spec.ts:

  • the existing flow now also asserts the hint on the new organisation's page before any token names it, no Members section there, and that the hint's link lands on Settings with the form reading alice, <org>; the token is issued without typing the namespaces; after signing in with it the hint is gone
  • a new test: a write token naming the organisation shows the roster (alice as admin) with no add form, no remove buttons, and the line about admin

No Rust changes; cargo checks not run.

…controls the hub accepts

Creating an organisation in Settings led to a page with nothing on it:
the token in use was issued before the organisation existed, so it
does not name it, and the roster answers 403 to such a token. The page
now says so when the signed-in token does not name the organisation,
and links to Settings with the token form naming the caller and the
organisation. The line is the same for a member and a stranger; it
says what a token needs, not who is in the organisation.

Straight after creating an organisation, Settings fills the same form
in and its notice says what has to happen first, instead of pointing
at a page that cannot show anything yet.

Once a token does name the organisation, the member controls appeared
for any token that could write there, while the hub asks admin on the
organisation -- the lesser of the token's scope and the caller's role
-- for adding and removing members. They now appear only for an admin
token of an admin member, read from the roster; everyone else sees the
roster and a line saying what managing it takes.

Closes #19.

Signed-off-by: Yutaka Nishimura <ytk.nishimura@gmail.com>
@ynishi
ynishi merged commit bff5b00 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.

After creating an organisation in the UI, its page shows nothing and does not say why

1 participant

0