Open liesauer opened 3 months ago
btw, it looks like the ACL does not support custom plugin yet.
"permissions": [
"my-plugin:hello"
]
Permission my-plugin:hello not found, expected one of app:default ...
if have a way to pass all commands or all commands of a plugin
You can add all of these to the default permission of the plugin and add the default permission to your capability. You only need to modify the plugins default permission in the plugin if you added a command and never touch the capabilities again.
btw, it looks like the ACL does not support custom plugin yet.
It supports all Tauri plugins out of the box and we have adapted most of our plugins in the plugin workspace, so feel free to check it out for reference (v2 branch).
Out of curiosity: Is your invoke filter using a similar concept as the isolation pattern or did you come up with another method?
ummm, i get it now, plugin permissions missing, i was expecting changing v1
to v2
and everything should works. :grin:
invoke filter is not similar as isolation pattern, because of the iframe
limitation, i am not using it and decided to make a little patch to intercept every commands on on_message
method.
when users run a "app" at first time, it will pop up a permission request dialog, if user allow, related commands get passed. similar concept as app permission likes modern operating system does. it more likes runtime version of ALC.
Interesting concept. We have a similar runtime scope handling with the dialog
+fs
plugin combination, allowing users to make slected paths to be accessible for the fs
plugin. Some plugins allow dynamic scope changes from rust at runtime using a "global" scope.
I think offering a generic way to prompt users at runtime for permission/scope changes/requests is something we should look into and make it part of the core functionality or a dedicated plugin after the 2.0 release.
Would you mind sharing relevant code or are you interested in supporting contributions to a plugin or Tauri itself to make your approach part of Tauri?
i was expecting changing v1 to v2 and everything should works. 😁
😁 would be nice right? Sometime we have to break things though and this a reason why we are doing a major version bump.
Did you try the migration tool or documentation from https://beta.tauri.app/guides/upgrade-migrate/from-tauri-1/?
Describe the problem
i already have a
invoke_filter
that use to judge which commands can be executed(before ACL came out). it does the exactly the same thing as ACL does. so i just want to pass everything in ACL side.Describe the solution you'd like
if have a way to pass all commands or all commands of a plugin, it would be better, we don't need to modify the capabilities file again and again when adding a new command.
Alternatives considered
No response
Additional context
No response