Skip to content

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

Merged
amrbashir merged 4 commits into
devfrom
feat/permission-apis
Aug 28, 2024
Merged

feat(api): permission types for mobile plugins#10799
amrbashir merged 4 commits into
devfrom
feat/permission-apis

Conversation

@lucasfernog

Copy link
Copy Markdown
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
@github-actions

github-actions Bot commented Aug 27, 2024

Copy link
Copy Markdown
Contributor

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

Comment thread tooling/api/src/core.ts
* 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

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