Repository navigation
Do not read the roles again after the account was refused - #173
Merged
Merged
Conversation
…ounts A list that decides per row which actions to offer starts reading the object permissions after its rows are shown, so a second reader mounts after an account that may not read the roles was already refused. The mounting reader reads the roles again and is refused again.
An account that may not read the roles learns what a role allows from its own assignments instead, and the refusal is cached as the answer. A list that shows rows and then starts the object permission reads mounted a second reader, which turned the cached refusal into a new request and was refused again. A reader that finds the refusal now leaves it alone.
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.
An account that may not read the roles learns what a role allows from its own assignments instead, and the refusal of the roles list is kept as the answer. A list that shows its rows and then starts the object permission reads mounts a second reader, and that reader turned the cached refusal into a new request, which was refused again. The repository's Distributions tab showed it for a read-only account: the roles list was requested twice in one page load.
A reader that finds the cached refusal now leaves it alone. The refusal is cleared with the rest of the cache when another account signs in.