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

feat(api): permission types for mobile plugins #10799

Merged
merged 4 commits into from
Aug 28, 2024
Merged

Conversation

lucasfernog
Copy link
Member

let's have a central place to keep the permission types

ref tauri-apps/plugins-workspace#979

let's have a central place to keep the permission types
ref tauri-apps/plugins-workspace#979
@lucasfernog lucasfernog requested a review from a team as a code owner August 27, 2024 17:09
Copy link
Contributor

github-actions bot commented Aug 27, 2024

Package Changes Through 7ec6ffd

There are 8 changes which include @tauri-apps/api with prerelease, tauri with prerelease, tauri-utils with prerelease, tauri-cli with prerelease, @tauri-apps/cli with prerelease, tauri-codegen with prerelease, tauri-bundler with prerelease, tauri-build with prerelease

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.0.0-rc.3 2.0.0-rc.4
tauri-utils 2.0.0-rc.6 2.0.0-rc.7
tauri-bundler 2.0.1-rc.5 2.0.1-rc.6
tauri-runtime 2.0.0-rc.6 2.0.0-rc.7
tauri-runtime-wry 2.0.0-rc.6 2.0.0-rc.7
tauri-codegen 2.0.0-rc.6 2.0.0-rc.7
tauri-macros 2.0.0-rc.5 2.0.0-rc.6
tauri-plugin 2.0.0-rc.6 2.0.0-rc.7
tauri-build 2.0.0-rc.6 2.0.0-rc.7
tauri 2.0.0-rc.6 2.0.0-rc.7
@tauri-apps/cli 2.0.0-rc.7 2.0.0-rc.8
tauri-cli 2.0.0-rc.7 2.0.0-rc.8

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

* This should be used by plugin authors to wrap their actual implementation.
*/
async function checkPermissions<T>(plugin: string): Promise<T> {
return invoke(`plugin:${plugin}|check_permissions`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't this require an implementation in Rust? if so, then I'd prefer to keep them in the same place as the rust impl, not here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are abstract methods..
the API here is only meant to be used by plugin authors (e.g. FS, NFC, notification plugin) to share the proper types

open fun checkPermissions(invoke: Invoke) {

@objc open func checkPermissions(_ invoke: Invoke) {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, this fine then

@amrbashir amrbashir merged commit f81929e into dev Aug 28, 2024
15 checks passed
@amrbashir amrbashir deleted the feat/permission-apis branch August 28, 2024 14:49
lucasfernog added a commit to tauri-apps/tauri-docs that referenced this pull request Sep 2, 2024
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