Skip to content

fix(acl): scope resolution should be per window#9068

Merged
lucasfernog merged 4 commits intodevfrom
fix/command-scope-window
Mar 4, 2024
Merged

fix(acl): scope resolution should be per window#9068
lucasfernog merged 4 commits intodevfrom
fix/command-scope-window

Conversation

@lucasfernog
Copy link
Member

The ACL resolution has a bug where it is grouping all scopes per command and execution context (the allowed_commands map key) and ignoring the capability window. This PR changes the resolution to only use the command name as map key, and use a vector to collect the resolved permissions (windows/webviews/context/scope).

This comes with a small breaking change because the scope is now resolved at runtime instead of being merged at compile time. Parsing via the ScopeObject trait is still only done once for each block of scope, but we now push copies of each scope entry (now stored as Arc) to the returned scope value. Previously an Arc<Vec> was used which isn't enough to copy the scopes around now that they are isolated to be referenced per window/webview.

@lucasfernog lucasfernog requested a review from a team as a code owner March 4, 2024 18:08
lucasfernog and others added 3 commits March 4, 2024 16:04
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
@lucasfernog lucasfernog merged commit 6c06832 into dev Mar 4, 2024
@lucasfernog lucasfernog deleted the fix/command-scope-window branch March 4, 2024 20:01
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.

2 participants