feat(core): capabilities on multiwebview contexts#8789
Merged
lucasfernog merged 4 commits intodevfrom Feb 16, 2024
Merged
Conversation
amrbashir
approved these changes
Feb 7, 2024
WofWca
added a commit
to WofWca/tauri
that referenced
this pull request
Mar 16, 2025
It is intuitive to expect that for the capability to be enabled, _both_ the window label and the webview label have to match. However, this is not the case: the capability is enabled if _either_ the window label matches a pattern in `Capability::windows` _or_ the webview label matches a pattern in `Capability::webviews`. This commit should somewhat clarify this oddity and protect developers from adding excessive permissions. For reference, `Capability::webviews` was added in 0cb0a15 (tauri-apps#8789).
lucasfernog
added a commit
that referenced
this pull request
Mar 17, 2025
* docs: clarify Capability::windows/webviews OR nature It is intuitive to expect that for the capability to be enabled, _both_ the window label and the webview label have to match. However, this is not the case: the capability is enabled if _either_ the window label matches a pattern in `Capability::windows` _or_ the webview label matches a pattern in `Capability::webviews`. This commit should somewhat clarify this oddity and protect developers from adding excessive permissions. For reference, `Capability::webviews` was added in 0cb0a15 (#8789). * Apply suggestions from code review Co-authored-by: Amr Bashir <github@amrbashir.me> * update schemas --------- Co-authored-by: Amr Bashir <github@amrbashir.me> Co-authored-by: Lucas Nogueira <lucas@tauri.app>
kandrelczyk
pushed a commit
to kandrelczyk/tauri
that referenced
this pull request
Apr 7, 2025
* docs: clarify Capability::windows/webviews OR nature It is intuitive to expect that for the capability to be enabled, _both_ the window label and the webview label have to match. However, this is not the case: the capability is enabled if _either_ the window label matches a pattern in `Capability::windows` _or_ the webview label matches a pattern in `Capability::webviews`. This commit should somewhat clarify this oddity and protect developers from adding excessive permissions. For reference, `Capability::webviews` was added in 0cb0a15 (tauri-apps#8789). * Apply suggestions from code review Co-authored-by: Amr Bashir <github@amrbashir.me> * update schemas --------- Co-authored-by: Amr Bashir <github@amrbashir.me> Co-authored-by: Lucas Nogueira <lucas@tauri.app>
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.
Adds a
webviewsarray on the capability model so you can select specific webviews to apply the permissions to.