Skip to content

Do not read the roles again after the account was refused - #173

Merged
aevnsvi merged 2 commits into
mainfrom
fix-refused-roles-read-on-later-mount
Nov 24, 2026
Merged

aevnsvi merged 2 commits into
mainfrom
fix-refused-roles-read-on-later-mount

Conversation

@aevnsvi

@aevnsvi aevnsvi commented Nov 24, 2026

Copy link
Copy Markdown

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.

  • Test first: a second reader that mounts after the refusal must not read the roles again (it failed before the change).
  • Local gate green: lint, 5,311 unit tests, build, bundle budget, public content guard, sdk generation clean and type check.

…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.
@aevnsvi
aevnsvi merged commit e1ff375 into main Nov 24, 2026
6 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.

1 participant