Skip to content

Do not check the session when the roles list is refused - #147

Merged
aevnsvi merged 2 commits into
mainfrom
refused-roles-read-keeps-session
Nov 21, 2026
Merged

aevnsvi merged 2 commits into
mainfrom
refused-roles-read-keeps-session

Conversation

@aevnsvi

@aevnsvi aevnsvi commented Nov 21, 2026

Copy link
Copy Markdown

A limited account is refused the list of roles by the server's access rules. The repository and remote lists read that list to learn what each role allows and take the refusal as their answer, falling back to the account's own role assignments. Every refusal of a signed-in user starts a who-is-signed-in request to tell an ended session from a plain refusal, so each of those screens made the same sign-in read twice, which a screen crawl as a read-only account reports as a repeated request.

A refused read of the roles list itself no longer starts that request. Only the list counts: one role, the roles of a user or group, and any write keep the check. A request of an ended session that is refused later is still refused as before and reports the end.

The tests come first: four of them fail on the unchanged code (the three spellings of the roles list address in the policy, and a refused roles read through the generated client that must make no sign-in read), and one test per other address and method shows that the check still runs there.

A limited account is refused the list of roles by the server's access rules,
and the screens that read it take the refusal as their answer and fall back to
the account's own role assignments. Every refusal of a signed-in user started
a who-is-signed-in request to tell an ended session from a plain refusal, so
each such screen made the same sign-in read twice. A refused read of the roles
list itself no longer starts it; any other request of an ended session is
refused as before and reports the end.
@aevnsvi
aevnsvi merged commit 5eed5a0 into main Nov 21, 2026
6 checks passed
@aevnsvi
aevnsvi deleted the refused-roles-read-keeps-session branch November 21, 2026 08:04
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.

1 participant