Repository navigation
Do not check the session when the roles list is refused - #147
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.