Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Mar 4, 2024

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
26 checks passed
@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.

None yet

2 participants