feat(core): allow defining permissions for the app commands#9008
Merged
lucasfernog merged 10 commits intodevfrom Feb 28, 2024
Merged
feat(core): allow defining permissions for the app commands#9008lucasfernog merged 10 commits intodevfrom
lucasfernog merged 10 commits intodevfrom
Conversation
amrbashir
reviewed
Feb 27, 2024
amrbashir
reviewed
Feb 27, 2024
core/tauri-build/src/lib.rs
Outdated
| } | ||
| let mut acl_manifests = acl::get_manifests_from_plugins()?; | ||
| acl_manifests.insert( | ||
| "".into(), |
Member
There was a problem hiding this comment.
this seems sort of magical key and can be easily forgot about? we should add an explicit field or marker for it
Member
Author
There was a problem hiding this comment.
you're right, pushed
amrbashir
approved these changes
Feb 27, 2024
WofWca
added a commit
to deltachat/deltachat-desktop
that referenced
this pull request
Mar 16, 2025
[The Tauri's API example app](https://github.com/tauri-apps/tauri/blob/cde0ff7798a46712f69b34aab952209f45500fe9/examples/api/src-tauri/build.rs#L9-L21) was used as a reference for the implementation of this commit. This tauri-apps/tauri#9008 says: > By default all app commands are still allowed, > so if you do not use `tauri_build::Attributes::app_manifest` > you're not affected by this change. Tauri docs don't seem to say much about how to disable this "allow all commands by default" thing. I have tested this change and verified that commands are not available in the HTML email viewer contents webview, and that only the required ones are available in its header webview. Note that the upcoming webxdc MR (#4740) will need to be adjusted to specify the allowed commands for the webxdc app windows.
WofWca
added a commit
to deltachat/deltachat-desktop
that referenced
this pull request
Mar 16, 2025
[The Tauri's API example app](https://github.com/tauri-apps/tauri/blob/cde0ff7798a46712f69b34aab952209f45500fe9/examples/api/src-tauri/build.rs#L9-L21) was used as a reference for the implementation of this commit. This tauri-apps/tauri#9008 says: > By default all app commands are still allowed, > so if you do not use `tauri_build::Attributes::app_manifest` > you're not affected by this change. Tauri docs don't seem to say much about how to disable this "allow all commands by default" thing. I have tested this change and verified that commands are not available in the HTML email viewer contents webview, and that only the required ones are available in its header webview. Note that the upcoming webxdc MR (#4740) will need to be adjusted to specify the allowed commands for the webxdc app windows.
WofWca
added a commit
to deltachat/deltachat-desktop
that referenced
this pull request
Mar 16, 2025
[The Tauri's API example app](https://github.com/tauri-apps/tauri/blob/cde0ff7798a46712f69b34aab952209f45500fe9/examples/api/src-tauri/build.rs#L9-L21) was used as a reference for the implementation of this commit. This tauri-apps/tauri#9008 says: > By default all app commands are still allowed, > so if you do not use `tauri_build::Attributes::app_manifest` > you're not affected by this change. Tauri docs don't seem to say much about how to disable this "allow all commands by default" thing. I have tested this change and verified that commands are not available in the HTML email viewer contents webview, and that only the required ones are available in its header webview. Note that the upcoming webxdc MR (#4740) will need to be adjusted to specify the allowed commands for the webxdc app windows.
WofWca
added a commit
to deltachat/deltachat-desktop
that referenced
this pull request
Mar 16, 2025
[The Tauri's API example app](https://github.com/tauri-apps/tauri/blob/cde0ff7798a46712f69b34aab952209f45500fe9/examples/api/src-tauri/build.rs#L9-L21) was used as a reference for the implementation of this commit. This tauri-apps/tauri#9008 says: > By default all app commands are still allowed, > so if you do not use `tauri_build::Attributes::app_manifest` > you're not affected by this change. Tauri docs don't seem to say much about how to disable this "allow all commands by default" thing. I have tested this change and verified that commands are not available in the HTML email viewer contents webview, and that only the required ones are available in its header webview. Note that the upcoming webxdc MR (#4740) will need to be adjusted to specify the allowed commands for the webxdc app windows.
WofWca
added a commit
to deltachat/deltachat-desktop
that referenced
this pull request
Mar 17, 2025
[The Tauri's API example app](https://github.com/tauri-apps/tauri/blob/cde0ff7798a46712f69b34aab952209f45500fe9/examples/api/src-tauri/build.rs#L9-L21) was used as a reference for the implementation of this commit. This tauri-apps/tauri#9008 says: > By default all app commands are still allowed, > so if you do not use `tauri_build::Attributes::app_manifest` > you're not affected by this change. Tauri docs don't seem to say much about how to disable this "allow all commands by default" thing. I have tested this change and verified that commands are not available in the HTML email viewer contents webview, and that only the required ones are available in its header webview. Note that the upcoming webxdc MR (#4740) will need to be adjusted to specify the allowed commands for the webxdc app windows. Co-authored-by: SimonLaux <mobile.info@simonlaux.de>
WofWca
added a commit
to deltachat/deltachat-desktop
that referenced
this pull request
Mar 17, 2025
[The Tauri's API example app](https://github.com/tauri-apps/tauri/blob/cde0ff7798a46712f69b34aab952209f45500fe9/examples/api/src-tauri/build.rs#L9-L21) was used as a reference for the implementation of this commit. This tauri-apps/tauri#9008 says: > By default all app commands are still allowed, > so if you do not use `tauri_build::Attributes::app_manifest` > you're not affected by this change. Tauri docs don't seem to say much about how to disable this "allow all commands by default" thing. I have tested this change and verified that commands are not available in the HTML email viewer contents webview, and that only the required ones are available in its header webview. Note that the upcoming webxdc MR (#4740) will need to be adjusted to specify the allowed commands for the webxdc app windows. Co-authored-by: SimonLaux <mobile.info@simonlaux.de>
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.
Current ACL only applies to plugin commands. This PR adds a mechanism to autogenerate permissions for the app commands - though it needs to be manually provided by the user :( - and also pull permission from a directory, similar to how plugin permissions work.
By default all app commands are still allowed, so if you do not use
tauri_build::Attributes::app_manifestyou're not affected by this change.