From f59436dad09939bd12655c229bd1fdcceff0b883 Mon Sep 17 00:00:00 2001 From: Tillmann <112912081+tillmann-crabnebula@users.noreply.github.com> Date: Tue, 27 Feb 2024 23:43:31 +0900 Subject: [PATCH 1/9] Added Security Policy to All Plugins (#930) * Added contact and security policy to remaining plugins and the repository * Added default security policy to shared template --- SECURITY.md | 23 +++++++++++++++++++++++ plugins/authenticator/SECURITY.md | 23 +++++++++++++++++++++++ plugins/autostart/SECURITY.md | 23 +++++++++++++++++++++++ plugins/biometric/SECURITY.md | 23 +++++++++++++++++++++++ plugins/cli/SECURITY.md | 23 +++++++++++++++++++++++ plugins/clipboard-manager/SECURITY.md | 23 +++++++++++++++++++++++ plugins/deep-link/SECURITY.md | 23 +++++++++++++++++++++++ plugins/dialog/SECURITY.md | 23 +++++++++++++++++++++++ plugins/global-shortcut/SECURITY.md | 23 +++++++++++++++++++++++ plugins/http/SECURITY.md | 23 +++++++++++++++++++++++ plugins/localhost/SECURITY.md | 23 +++++++++++++++++++++++ plugins/nfc/SECURITY.md | 23 +++++++++++++++++++++++ plugins/notification/SECURITY.md | 23 +++++++++++++++++++++++ plugins/os/SECURITY.md | 23 +++++++++++++++++++++++ plugins/persisted-scope/SECURITY.md | 23 +++++++++++++++++++++++ plugins/positioner/SECURITY.md | 23 +++++++++++++++++++++++ plugins/process/SECURITY.md | 23 +++++++++++++++++++++++ plugins/shell/SECURITY.md | 23 +++++++++++++++++++++++ plugins/single-instance/SECURITY.md | 23 +++++++++++++++++++++++ plugins/sql/SECURITY.md | 23 +++++++++++++++++++++++ plugins/store/SECURITY.md | 23 +++++++++++++++++++++++ plugins/stronghold/SECURITY.md | 23 +++++++++++++++++++++++ plugins/updater/SECURITY.md | 23 +++++++++++++++++++++++ plugins/upload/SECURITY.md | 23 +++++++++++++++++++++++ plugins/websocket/SECURITY.md | 23 +++++++++++++++++++++++ plugins/window-state/SECURITY.md | 23 +++++++++++++++++++++++ shared/template/SECURITY.md | 23 +++++++++++++++++++++++ 27 files changed, 621 insertions(+) create mode 100644 SECURITY.md create mode 100644 plugins/authenticator/SECURITY.md create mode 100644 plugins/autostart/SECURITY.md create mode 100644 plugins/biometric/SECURITY.md create mode 100644 plugins/cli/SECURITY.md create mode 100644 plugins/clipboard-manager/SECURITY.md create mode 100644 plugins/deep-link/SECURITY.md create mode 100644 plugins/dialog/SECURITY.md create mode 100644 plugins/global-shortcut/SECURITY.md create mode 100644 plugins/http/SECURITY.md create mode 100644 plugins/localhost/SECURITY.md create mode 100644 plugins/nfc/SECURITY.md create mode 100644 plugins/notification/SECURITY.md create mode 100644 plugins/os/SECURITY.md create mode 100644 plugins/persisted-scope/SECURITY.md create mode 100644 plugins/positioner/SECURITY.md create mode 100644 plugins/process/SECURITY.md create mode 100644 plugins/shell/SECURITY.md create mode 100644 plugins/single-instance/SECURITY.md create mode 100644 plugins/sql/SECURITY.md create mode 100644 plugins/store/SECURITY.md create mode 100644 plugins/stronghold/SECURITY.md create mode 100644 plugins/updater/SECURITY.md create mode 100644 plugins/upload/SECURITY.md create mode 100644 plugins/websocket/SECURITY.md create mode 100644 plugins/window-state/SECURITY.md create mode 100644 shared/template/SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/authenticator/SECURITY.md b/plugins/authenticator/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/authenticator/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/autostart/SECURITY.md b/plugins/autostart/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/autostart/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/biometric/SECURITY.md b/plugins/biometric/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/biometric/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/cli/SECURITY.md b/plugins/cli/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/cli/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/clipboard-manager/SECURITY.md b/plugins/clipboard-manager/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/clipboard-manager/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/deep-link/SECURITY.md b/plugins/deep-link/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/deep-link/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/dialog/SECURITY.md b/plugins/dialog/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/dialog/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/global-shortcut/SECURITY.md b/plugins/global-shortcut/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/global-shortcut/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/http/SECURITY.md b/plugins/http/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/http/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/localhost/SECURITY.md b/plugins/localhost/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/localhost/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/nfc/SECURITY.md b/plugins/nfc/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/nfc/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/notification/SECURITY.md b/plugins/notification/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/notification/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/os/SECURITY.md b/plugins/os/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/os/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/persisted-scope/SECURITY.md b/plugins/persisted-scope/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/persisted-scope/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/positioner/SECURITY.md b/plugins/positioner/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/positioner/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/process/SECURITY.md b/plugins/process/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/process/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/shell/SECURITY.md b/plugins/shell/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/shell/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/single-instance/SECURITY.md b/plugins/single-instance/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/single-instance/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/sql/SECURITY.md b/plugins/sql/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/sql/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/store/SECURITY.md b/plugins/store/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/store/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/stronghold/SECURITY.md b/plugins/stronghold/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/stronghold/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/updater/SECURITY.md b/plugins/updater/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/updater/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/upload/SECURITY.md b/plugins/upload/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/upload/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/websocket/SECURITY.md b/plugins/websocket/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/websocket/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/plugins/window-state/SECURITY.md b/plugins/window-state/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/plugins/window-state/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file diff --git a/shared/template/SECURITY.md b/shared/template/SECURITY.md new file mode 100644 index 00000000..67d831fc --- /dev/null +++ b/shared/template/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). \ No newline at end of file From 9d4b25cf85fbf38f2506f5a5bcd79465d61bab54 Mon Sep 17 00:00:00 2001 From: AHQ Date: Wed, 28 Feb 2024 22:33:51 +0530 Subject: [PATCH 2/9] Bump tauri to v2 beta.7 (#1001) * Bump tauri to v2 beta.7 * change file --------- Co-authored-by: Amr Bashir --- .changes/tauri-beta.7.md | 57 ++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 6 ++--- 2 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 .changes/tauri-beta.7.md diff --git a/.changes/tauri-beta.7.md b/.changes/tauri-beta.7.md new file mode 100644 index 00000000..3df24ab3 --- /dev/null +++ b/.changes/tauri-beta.7.md @@ -0,0 +1,57 @@ +--- +"authenticator": patch +"autostart": patch +"barcode-scanner": patch +"biometric": patch +"cli": patch +"clipboard-manager": patch +"deep-link": patch +"dialog": patch +"fs": patch +"global-shortcut": patch +"http": patch +"localhost": patch +"log-plugin": patch +"nfc": patch +"notification": patch +"os": patch +"persisted-scope": patch +"positioner": patch +"process": patch +"shell": patch +"single-instance": patch +"sql": patch +"store": patch +"stronghold": patch +"updater": patch +"upload": patch +"websocket": patch +"window-state": patch +"authenticator-js": patch +"autostart-js": patch +"barcode-scanner-js": patch +"biometric-js": patch +"cli-js": patch +"clipboard-manager-js": patch +"deep-link-js": patch +"dialog-js": patch +"fs-js": patch +"global-shortcut-js": patch +"http-js": patch +"log-js": patch +"nfc-js": patch +"notification-js": patch +"os-js": patch +"positioner-js": patch +"process-js": patch +"shell-js": patch +"sql-js": patch +"store-js": patch +"stronghold-js": patch +"updater-js": patch +"upload-js": patch +"websocket-js": patch +"window-state-js": patch +--- + +Update to tauri beta.7. diff --git a/Cargo.toml b/Cargo.toml index cdc5865e..d318e198 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,9 +10,9 @@ resolver = "2" [workspace.dependencies] serde = { version = "1", features = ["derive"] } log = "0.4" -tauri = "2.0.0-beta.4" -tauri-build = "2.0.0-beta.3" -tauri-plugin = "2.0.0-beta.3" +tauri = "2.0.0-beta.7" +tauri-build = "2.0.0-beta.5" +tauri-plugin = "2.0.0-beta.5" serde_json = "1" thiserror = "1" url = "2" From 99bea2559c2c0648c2519c50a18cd124dacef57b Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Thu, 29 Feb 2024 18:34:43 +0100 Subject: [PATCH 3/9] chore: Update tauri to beta.8 (#1005) * chore: Update tauri to beta.8 fixes #1000 * Update and rename tauri-beta.7.md to tauri-beta-8.md --- .changes/{tauri-beta.7.md => tauri-beta-8.md} | 2 +- Cargo.toml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename .changes/{tauri-beta.7.md => tauri-beta-8.md} (97%) diff --git a/.changes/tauri-beta.7.md b/.changes/tauri-beta-8.md similarity index 97% rename from .changes/tauri-beta.7.md rename to .changes/tauri-beta-8.md index 3df24ab3..2bbcc16f 100644 --- a/.changes/tauri-beta.7.md +++ b/.changes/tauri-beta-8.md @@ -54,4 +54,4 @@ "window-state-js": patch --- -Update to tauri beta.7. +Update to tauri beta.8. diff --git a/Cargo.toml b/Cargo.toml index d318e198..63a7acb8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,9 +10,9 @@ resolver = "2" [workspace.dependencies] serde = { version = "1", features = ["derive"] } log = "0.4" -tauri = "2.0.0-beta.7" -tauri-build = "2.0.0-beta.5" -tauri-plugin = "2.0.0-beta.5" +tauri = "2.0.0-beta.8" +tauri-build = "2.0.0-beta.6" +tauri-plugin = "2.0.0-beta.6" serde_json = "1" thiserror = "1" url = "2" From 2397ec5937e594397e533925ccd257cae30b4cd1 Mon Sep 17 00:00:00 2001 From: Tony <68118705+Legend-Master@users.noreply.github.com> Date: Mon, 4 Mar 2024 21:52:40 +0800 Subject: [PATCH 4/9] fix: single instance doesn't shutdown immediately (#1019) * Fix single instance doesn't shutdown immediately * Add change file --- .changes/fix-shutdown-timing.md | 5 +++++ plugins/single-instance/src/platform_impl/linux.rs | 3 ++- plugins/single-instance/src/platform_impl/windows.rs | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changes/fix-shutdown-timing.md diff --git a/.changes/fix-shutdown-timing.md b/.changes/fix-shutdown-timing.md new file mode 100644 index 00000000..568f5766 --- /dev/null +++ b/.changes/fix-shutdown-timing.md @@ -0,0 +1,5 @@ +--- +'single-instance': patch +--- + +Fix doesn't shutdown immediately. diff --git a/plugins/single-instance/src/platform_impl/linux.rs b/plugins/single-instance/src/platform_impl/linux.rs index c613a0d6..d900cf8b 100644 --- a/plugins/single-instance/src/platform_impl/linux.rs +++ b/plugins/single-instance/src/platform_impl/linux.rs @@ -70,7 +70,8 @@ pub fn init(f: Box>) -> TauriPlugin { ), ); } - std::process::exit(0) + app.cleanup_before_exit(); + std::process::exit(0); } _ => {} } diff --git a/plugins/single-instance/src/platform_impl/windows.rs b/plugins/single-instance/src/platform_impl/windows.rs index f66b2d1a..63be767d 100644 --- a/plugins/single-instance/src/platform_impl/windows.rs +++ b/plugins/single-instance/src/platform_impl/windows.rs @@ -62,7 +62,8 @@ pub fn init(f: Box>) -> TauriPlugin { lpData: bytes.as_ptr() as _, }; SendMessageW(hwnd, WM_COPYDATA, 0, &cds as *const _ as _); - app.exit(0); + app.cleanup_before_exit(); + std::process::exit(0); } } } else { From 9586eabd5a96673e4d976757777f470ae358d68a Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 4 Mar 2024 18:28:53 +0200 Subject: [PATCH 5/9] chore(deps): update to `open-rs@5.1` (#1021) * chore(deps): update to `open-rs@5.1` ref: #1003 * changefile --- .changes/shell-shellexcute.md | 6 ++ Cargo.lock | 142 ++++++++++++---------------------- plugins/shell/Cargo.toml | 2 +- 3 files changed, 57 insertions(+), 93 deletions(-) create mode 100644 .changes/shell-shellexcute.md diff --git a/.changes/shell-shellexcute.md b/.changes/shell-shellexcute.md new file mode 100644 index 00000000..20b7b310 --- /dev/null +++ b/.changes/shell-shellexcute.md @@ -0,0 +1,6 @@ +--- +"shell": "patch" +"shell-js": "patch" +--- + +On Windows, fix `open` can't open file if the file is being used by a program. diff --git a/Cargo.lock b/Cargo.lock index 13b16169..97d337f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -562,7 +562,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi 0.1.19", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -579,7 +579,7 @@ dependencies = [ "log", "rand 0.7.3", "runloop", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1174,7 +1174,7 @@ checksum = "5a5f741c91823341bebf717d4c71bda820630ce065443b58bd1b7451af008355" dependencies = [ "is-terminal", "lazy_static", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1633,7 +1633,7 @@ checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", "redox_users", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1644,7 +1644,7 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1671,7 +1671,7 @@ dependencies = [ "dlopen2_derive", "libc", "once_cell", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2472,7 +2472,7 @@ dependencies = [ "gobject-sys 0.16.3", "libc", "system-deps", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2485,7 +2485,7 @@ dependencies = [ "gobject-sys 0.18.0", "libc", "system-deps", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2828,7 +2828,7 @@ checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" dependencies = [ "libc", "match_cfg", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3266,7 +3266,7 @@ dependencies = [ "jni-sys", "log", "thiserror", - "walkdir 2.4.0", + "walkdir", "windows-sys 0.45.0", ] @@ -3315,16 +3315,6 @@ dependencies = [ "treediff", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "keyboard-types" version = "0.6.2" @@ -3432,7 +3422,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ "cfg-if", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3471,7 +3461,7 @@ dependencies = [ "cc", "libc", "pkg-config", - "walkdir 2.4.0", + "walkdir", ] [[package]] @@ -3882,7 +3872,7 @@ dependencies = [ "log", "mio", "serde", - "walkdir 2.4.0", + "walkdir", "windows-sys 0.48.0", ] @@ -3897,7 +3887,7 @@ dependencies = [ "log", "notify", "parking_lot", - "walkdir 2.4.0", + "walkdir", ] [[package]] @@ -3907,7 +3897,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" dependencies = [ "overload", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -4065,9 +4055,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "open" -version = "4.2.0" +version = "5.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a083c0c7e5e4a8ec4176346cf61f67ac674e8bfb059d9226e1c54a96b377c12" +checksum = "68b3fbb0d52bf0cbb5225ba3d2c303aa136031d43abff98284332a9981ecddec" dependencies = [ "is-wsl", "libc", @@ -4146,7 +4136,7 @@ checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" dependencies = [ "log", "serde", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -5038,7 +5028,7 @@ dependencies = [ "spin 0.5.2", "untrusted 0.7.1", "web-sys", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -5277,16 +5267,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" -[[package]] -name = "same-file" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" -dependencies = [ - "kernel32-sys", - "winapi 0.2.8", -] - [[package]] name = "same-file" version = "1.0.6" @@ -5598,7 +5578,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -6281,9 +6261,9 @@ checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" [[package]] name = "tauri" -version = "2.0.0-beta.4" +version = "2.0.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6b10809e932ed85813fff9ac748cbcc0cf4c78209433b1b6e025660619f2e4" +checksum = "b2bd3d5ccf5316833c0f71c645c25585bddf997a16bea652bf3eab8114273cff" dependencies = [ "anyhow", "bytes", @@ -6334,9 +6314,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-beta.3" +version = "2.0.0-beta.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ea663cde4862231178215d364b3650dade8cb159fc84a1bea5c365689dacd0" +checksum = "3ca30dbed856449b41abed13a5a46655ea2196075e09e99e22fe8ed0958b6aee" dependencies = [ "anyhow", "cargo_toml", @@ -6353,14 +6333,14 @@ dependencies = [ "tauri-utils", "tauri-winres", "toml 0.8.2", - "walkdir 2.4.0", + "walkdir", ] [[package]] name = "tauri-codegen" -version = "2.0.0-beta.3" +version = "2.0.0-beta.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94a770b18aa021b0c8568c8f0d347044a72d349b6a13dd1db28c558832e8e681" +checksum = "bf4ed45a0d2a1723ef4ea71d1aa5809c4a8bcaa92de77f6c9a8f4d4f28c5d86a" dependencies = [ "base64 0.21.7", "brotli", @@ -6380,14 +6360,14 @@ dependencies = [ "time", "url", "uuid", - "walkdir 2.4.0", + "walkdir", ] [[package]] name = "tauri-macros" -version = "2.0.0-beta.3" +version = "2.0.0-beta.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b100bf9f05a013719fa6c9bf096da42511888b3671d9c22bffa12a030d76a9" +checksum = "d0a75661fb86b350141e78ad54ce9c60346149afc5cbf41de2ca60a1ebc252b3" dependencies = [ "heck", "proc-macro2", @@ -6399,9 +6379,9 @@ dependencies = [ [[package]] name = "tauri-plugin" -version = "2.0.0-beta.3" +version = "2.0.0-beta.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "140c010cfb7120c9276e6e0b0c271dabb7988be2998011f918b669e766224e55" +checksum = "e9530f0f0d809e77ff9a93da5ff2483faf8fef2cb8ed125ca7b0172cb92685d4" dependencies = [ "anyhow", "glob", @@ -6411,7 +6391,7 @@ dependencies = [ "serde_json", "tauri-utils", "toml 0.8.2", - "walkdir 1.0.7", + "walkdir", ] [[package]] @@ -6723,7 +6703,7 @@ dependencies = [ [[package]] name = "tauri-plugin-single-instance" -version = "2.0.0-beta.1" +version = "2.0.0-beta.2" dependencies = [ "log", "serde", @@ -6860,9 +6840,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.0.0-beta.3" +version = "2.0.0-beta.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc687ef6571127f0ad9a9bef141ca3f8d9597b7f99949047d5c69ed731cf36c4" +checksum = "0381b4b96e1f4f39a24ca6472c9b016151b103a54b1425233007fdbc26cf20a8" dependencies = [ "gtk", "http 0.2.11", @@ -6878,9 +6858,9 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.0.0-beta.3" +version = "2.0.0-beta.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a07b1d76d4159aec5c2cff742e30b0f5b3675a2520b979acbbc66c5f92c99491" +checksum = "4eef6a8373c9936b33a58c1bdbdd76fe4603d00ebe72304c0777bf0674e455aa" dependencies = [ "cocoa 0.25.0", "gtk", @@ -6892,6 +6872,7 @@ dependencies = [ "tao", "tauri-runtime", "tauri-utils", + "url", "webkit2gtk", "webview2-com", "windows 0.52.0", @@ -6900,9 +6881,9 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-beta.3" +version = "2.0.0-beta.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2729b59832a96dd05f4f2ced33e2ab976ca60c58c1d675afe6aabc486eb51143" +checksum = "92e35e2f9a5ee8539d00dde621f176647747736a388a07c3083a0cc1b96ba6d7" dependencies = [ "aes-gcm 0.10.3", "brotli", @@ -6931,7 +6912,7 @@ dependencies = [ "thiserror", "toml 0.8.2", "url", - "walkdir 2.4.0", + "walkdir", ] [[package]] @@ -7466,7 +7447,7 @@ checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ "memoffset 0.9.0", "tempfile", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -7647,24 +7628,13 @@ dependencies = [ "libc", ] -[[package]] -name = "walkdir" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff" -dependencies = [ - "kernel32-sys", - "same-file 0.1.3", - "winapi 0.2.8", -] - [[package]] name = "walkdir" version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ - "same-file 1.0.6", + "same-file", "winapi-util", ] @@ -7964,12 +7934,6 @@ dependencies = [ "windows-sys 0.36.1", ] -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -7980,12 +7944,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -7998,7 +7956,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -8381,7 +8339,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -8406,9 +8364,9 @@ dependencies = [ [[package]] name = "wry" -version = "0.36.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a9e7b81968555303086ef882a0c213896a76099de4ed0b86a798775c2d54304" +checksum = "8b717040ba9771fd88eb428c6ea6b555f8e734ff8534f02c13e8f10d97f5935e" dependencies = [ "base64 0.21.7", "block", @@ -8432,6 +8390,7 @@ dependencies = [ "objc", "objc_id", "once_cell", + "percent-encoding", "raw-window-handle 0.6.0", "serde", "serde_json", @@ -8439,7 +8398,6 @@ dependencies = [ "soup3", "tao-macros", "thiserror", - "url", "webkit2gtk", "webkit2gtk-sys", "webview2-com", @@ -8529,7 +8487,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] diff --git a/plugins/shell/Cargo.toml b/plugins/shell/Cargo.toml index f4d957ce..89dfd1aa 100644 --- a/plugins/shell/Cargo.toml +++ b/plugins/shell/Cargo.toml @@ -26,6 +26,6 @@ log = { workspace = true } thiserror = { workspace = true } shared_child = "1" regex = "1" -open = "4" +open = { version = "5", features = [ "shellexecute-on-windows" ] } encoding_rs = "0.8" os_pipe = "1" From 8a5e05cd83f574ccb28eacb64df6df527e737a99 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Mon, 4 Mar 2024 18:59:24 +0100 Subject: [PATCH 6/9] fix: Fix comp with latest beta (#1018) * fix: Fix comp with latest beta * linux --- .gitignore | 3 +- Cargo.lock | 2 +- examples/api/package.json | 4 +- examples/api/src-tauri/build.rs | 8 +- .../src-tauri/gen/schemas/desktop-schema.json | 82 +- examples/api/src-tauri/src/lib.rs | 2 +- .../permissions/autogenerated/reference.md | 54 +- .../permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 34 +- .../autostart/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 64 +- .../permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 24 +- .../biometric/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 19 +- plugins/cli/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 24 +- .../permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 19 +- .../deep-link/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 54 +- .../dialog/permissions/schemas/schema.json | 56 +- .../fs/permissions/autogenerated/reference.md | 1430 ++++------------- plugins/fs/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 54 +- .../permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 49 +- plugins/http/permissions/schemas/schema.json | 56 +- plugins/localhost/src/lib.rs | 10 - .../permissions/autogenerated/reference.md | 19 +- plugins/log/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 34 +- plugins/nfc/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 39 +- .../permissions/schemas/schema.json | 56 +- .../os/permissions/autogenerated/reference.md | 84 +- plugins/os/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 19 +- .../permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 24 +- .../process/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 44 +- plugins/shell/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 44 +- plugins/sql/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 124 +- plugins/store/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 114 +- .../permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 29 +- .../updater/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 24 +- .../upload/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 29 +- .../websocket/permissions/schemas/schema.json | 56 +- .../permissions/autogenerated/reference.md | 24 +- .../permissions/schemas/schema.json | 56 +- pnpm-lock.yaml | 208 ++- 58 files changed, 2066 insertions(+), 2129 deletions(-) diff --git a/.gitignore b/.gitignore index f8932e56..5ea09efa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ target node_modules dist-js -dist \ No newline at end of file +dist +**/capabilities/schemas \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 97d337f5..ca97ee3b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1659,7 +1659,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.8.1", + "libloading 0.7.4", ] [[package]] diff --git a/examples/api/package.json b/examples/api/package.json index f10d760a..c14ca3f1 100644 --- a/examples/api/package.json +++ b/examples/api/package.json @@ -9,7 +9,7 @@ "serve": "vite preview" }, "dependencies": { - "@tauri-apps/api": "2.0.0-beta.2", + "@tauri-apps/api": "2.0.0-beta.3", "@tauri-apps/plugin-barcode-scanner": "2.0.0-beta.1", "@tauri-apps/plugin-biometric": "2.0.0-beta.1", "@tauri-apps/plugin-cli": "2.0.0-beta.1", @@ -30,7 +30,7 @@ "@iconify-json/codicon": "^1.1.37", "@iconify-json/ph": "^1.1.8", "@sveltejs/vite-plugin-svelte": "^3.0.1", - "@tauri-apps/cli": "2.0.0-beta.3", + "@tauri-apps/cli": "2.0.0-beta.6", "@unocss/extractor-svelte": "^0.58.0", "internal-ip": "^8.0.0", "svelte": "^4.2.8", diff --git a/examples/api/src-tauri/build.rs b/examples/api/src-tauri/build.rs index 322bc7bf..88537dde 100644 --- a/examples/api/src-tauri/build.rs +++ b/examples/api/src-tauri/build.rs @@ -3,11 +3,5 @@ // SPDX-License-Identifier: MIT fn main() { - let mut codegen = tauri_build::CodegenContext::new(); - if !cfg!(feature = "custom-protocol") { - codegen = codegen.dev(); - } - - tauri_build::try_build(tauri_build::Attributes::new().codegen(codegen)) - .expect("failed to run tauri_build::try_build"); + tauri_build::build(); } diff --git a/examples/api/src-tauri/gen/schemas/desktop-schema.json b/examples/api/src-tauri/gen/schemas/desktop-schema.json index 88c01d5b..2d283f77 100644 --- a/examples/api/src-tauri/gen/schemas/desktop-schema.json +++ b/examples/api/src-tauri/gen/schemas/desktop-schema.json @@ -47,15 +47,22 @@ "default": "", "type": "string" }, - "context": { - "description": "Execution context of the capability.\n\nAt runtime, Tauri filters the IPC command together with the context to determine whether it is allowed or not and its scope.", - "default": "local", - "allOf": [ + "remote": { + "description": "Configure remote URLs that can use the capability permissions.", + "anyOf": [ + { + "$ref": "#/definitions/CapabilityRemote" + }, { - "$ref": "#/definitions/CapabilityContext" + "type": "null" } ] }, + "local": { + "description": "Whether this capability is enabled for local app URLs or not. Defaults to `true`.", + "default": true, + "type": "boolean" + }, "windows": { "description": "List of windows that uses this capability. Can be a glob pattern.\n\nOn multiwebview windows, prefer [`Self::webviews`] for a fine grained access control.", "type": "array", @@ -78,7 +85,7 @@ } }, "platforms": { - "description": "Target platforms this capability applies. By default all platforms applies.", + "description": "Target platforms this capability applies. By default all platforms are affected by this capability.", "default": [ "linux", "macOS", @@ -93,42 +100,21 @@ } } }, - "CapabilityContext": { - "description": "Context of the capability.", - "oneOf": [ - { - "description": "Capability refers to local URL usage.", - "type": "string", - "enum": [ - "local" - ] - }, - { - "description": "Capability refers to remote usage.", - "type": "object", - "required": [ - "remote" - ], - "properties": { - "remote": { - "type": "object", - "required": [ - "urls" - ], - "properties": { - "urls": { - "description": "Remote domains this capability refers to. Can use glob patterns.", - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "additionalProperties": false + "CapabilityRemote": { + "description": "Configuration for remote URLs that are associated with the capability.", + "type": "object", + "required": [ + "urls" + ], + "properties": { + "urls": { + "description": "Remote domains this capability refers to. Can use glob patterns.", + "type": "array", + "items": { + "type": "string" + } } - ] + } }, "PermissionEntry": { "description": "An entry for a permission value in a [`Capability`] can be either a raw permission [`Identifier`] or an object that references a permission and extends its scope.", @@ -5728,6 +5714,13 @@ "webview:allow-print" ] }, + { + "description": "webview:allow-reparent -> Enables the reparent command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-reparent" + ] + }, { "description": "webview:allow-set-webview-focus -> Enables the set_webview_focus command without any pre-configured scope.", "type": "string", @@ -5798,6 +5791,13 @@ "webview:deny-print" ] }, + { + "description": "webview:deny-reparent -> Denies the reparent command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-reparent" + ] + }, { "description": "webview:deny-set-webview-focus -> Denies the set_webview_focus command without any pre-configured scope.", "type": "string", diff --git a/examples/api/src-tauri/src/lib.rs b/examples/api/src-tauri/src/lib.rs index b40290bd..bacdcf1b 100644 --- a/examples/api/src-tauri/src/lib.rs +++ b/examples/api/src-tauri/src/lib.rs @@ -132,7 +132,7 @@ pub fn run() { cmd::log_operation, cmd::perform_request, ]) - .build(tauri::tauri_build_context!()) + .build(tauri::generate_context!()) .expect("error while building tauri application"); #[cfg(target_os = "macos")] diff --git a/plugins/authenticator/permissions/autogenerated/reference.md b/plugins/authenticator/permissions/autogenerated/reference.md index 8e3cbb52..c82e61c7 100644 --- a/plugins/authenticator/permissions/autogenerated/reference.md +++ b/plugins/authenticator/permissions/autogenerated/reference.md @@ -1,42 +1,12 @@ -# Permissions - -## allow-init-auth - -Enables the init_auth command without any pre-configured scope. - -## deny-init-auth - -Denies the init_auth command without any pre-configured scope. - -## allow-register - -Enables the register command without any pre-configured scope. - -## deny-register - -Denies the register command without any pre-configured scope. - -## allow-sign - -Enables the sign command without any pre-configured scope. - -## deny-sign - -Denies the sign command without any pre-configured scope. - -## allow-verify-registration - -Enables the verify_registration command without any pre-configured scope. - -## deny-verify-registration - -Denies the verify_registration command without any pre-configured scope. - -## allow-verify-signature - -Enables the verify_signature command without any pre-configured scope. - -## deny-verify-signature - -Denies the verify_signature command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-init-auth`|Enables the init_auth command without any pre-configured scope.| +|`deny-init-auth`|Denies the init_auth command without any pre-configured scope.| +|`allow-register`|Enables the register command without any pre-configured scope.| +|`deny-register`|Denies the register command without any pre-configured scope.| +|`allow-sign`|Enables the sign command without any pre-configured scope.| +|`deny-sign`|Denies the sign command without any pre-configured scope.| +|`allow-verify-registration`|Enables the verify_registration command without any pre-configured scope.| +|`deny-verify-registration`|Denies the verify_registration command without any pre-configured scope.| +|`allow-verify-signature`|Enables the verify_signature command without any pre-configured scope.| +|`deny-verify-signature`|Denies the verify_signature command without any pre-configured scope.| diff --git a/plugins/authenticator/permissions/schemas/schema.json b/plugins/authenticator/permissions/schemas/schema.json index d5482860..3d8711b9 100644 --- a/plugins/authenticator/permissions/schemas/schema.json +++ b/plugins/authenticator/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/autostart/permissions/autogenerated/reference.md b/plugins/autostart/permissions/autogenerated/reference.md index e129ae02..73d22eb9 100644 --- a/plugins/autostart/permissions/autogenerated/reference.md +++ b/plugins/autostart/permissions/autogenerated/reference.md @@ -1,26 +1,8 @@ -# Permissions - -## allow-disable - -Enables the disable command without any pre-configured scope. - -## deny-disable - -Denies the disable command without any pre-configured scope. - -## allow-enable - -Enables the enable command without any pre-configured scope. - -## deny-enable - -Denies the enable command without any pre-configured scope. - -## allow-is-enabled - -Enables the is_enabled command without any pre-configured scope. - -## deny-is-enabled - -Denies the is_enabled command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-disable`|Enables the disable command without any pre-configured scope.| +|`deny-disable`|Denies the disable command without any pre-configured scope.| +|`allow-enable`|Enables the enable command without any pre-configured scope.| +|`deny-enable`|Denies the enable command without any pre-configured scope.| +|`allow-is-enabled`|Enables the is_enabled command without any pre-configured scope.| +|`deny-is-enabled`|Denies the is_enabled command without any pre-configured scope.| diff --git a/plugins/autostart/permissions/schemas/schema.json b/plugins/autostart/permissions/schemas/schema.json index 9a471e09..5fcdb154 100644 --- a/plugins/autostart/permissions/schemas/schema.json +++ b/plugins/autostart/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/barcode-scanner/permissions/autogenerated/reference.md b/plugins/barcode-scanner/permissions/autogenerated/reference.md index d20ff148..1d45e36c 100644 --- a/plugins/barcode-scanner/permissions/autogenerated/reference.md +++ b/plugins/barcode-scanner/permissions/autogenerated/reference.md @@ -1,50 +1,14 @@ -# Permissions - -## allow-cancel - -Enables the cancel command without any pre-configured scope. - -## deny-cancel - -Denies the cancel command without any pre-configured scope. - -## allow-check-permissions - -Enables the check_permissions command without any pre-configured scope. - -## deny-check-permissions - -Denies the check_permissions command without any pre-configured scope. - -## allow-open-app-settings - -Enables the open_app_settings command without any pre-configured scope. - -## deny-open-app-settings - -Denies the open_app_settings command without any pre-configured scope. - -## allow-request-permissions - -Enables the request_permissions command without any pre-configured scope. - -## deny-request-permissions - -Denies the request_permissions command without any pre-configured scope. - -## allow-scan - -Enables the scan command without any pre-configured scope. - -## deny-scan - -Denies the scan command without any pre-configured scope. - -## allow-vibrate - -Enables the vibrate command without any pre-configured scope. - -## deny-vibrate - -Denies the vibrate command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-cancel`|Enables the cancel command without any pre-configured scope.| +|`deny-cancel`|Denies the cancel command without any pre-configured scope.| +|`allow-check-permissions`|Enables the check_permissions command without any pre-configured scope.| +|`deny-check-permissions`|Denies the check_permissions command without any pre-configured scope.| +|`allow-open-app-settings`|Enables the open_app_settings command without any pre-configured scope.| +|`deny-open-app-settings`|Denies the open_app_settings command without any pre-configured scope.| +|`allow-request-permissions`|Enables the request_permissions command without any pre-configured scope.| +|`deny-request-permissions`|Denies the request_permissions command without any pre-configured scope.| +|`allow-scan`|Enables the scan command without any pre-configured scope.| +|`deny-scan`|Denies the scan command without any pre-configured scope.| +|`allow-vibrate`|Enables the vibrate command without any pre-configured scope.| +|`deny-vibrate`|Denies the vibrate command without any pre-configured scope.| diff --git a/plugins/barcode-scanner/permissions/schemas/schema.json b/plugins/barcode-scanner/permissions/schemas/schema.json index 1fd55fd1..200c6a3e 100644 --- a/plugins/barcode-scanner/permissions/schemas/schema.json +++ b/plugins/barcode-scanner/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/biometric/permissions/autogenerated/reference.md b/plugins/biometric/permissions/autogenerated/reference.md index ef091dfa..e48ce066 100644 --- a/plugins/biometric/permissions/autogenerated/reference.md +++ b/plugins/biometric/permissions/autogenerated/reference.md @@ -1,18 +1,6 @@ -# Permissions - -## allow-authenticate - -Enables the authenticate command without any pre-configured scope. - -## deny-authenticate - -Denies the authenticate command without any pre-configured scope. - -## allow-status - -Enables the status command without any pre-configured scope. - -## deny-status - -Denies the status command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-authenticate`|Enables the authenticate command without any pre-configured scope.| +|`deny-authenticate`|Denies the authenticate command without any pre-configured scope.| +|`allow-status`|Enables the status command without any pre-configured scope.| +|`deny-status`|Denies the status command without any pre-configured scope.| diff --git a/plugins/biometric/permissions/schemas/schema.json b/plugins/biometric/permissions/schemas/schema.json index 8a83e483..600610a4 100644 --- a/plugins/biometric/permissions/schemas/schema.json +++ b/plugins/biometric/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/cli/permissions/autogenerated/reference.md b/plugins/cli/permissions/autogenerated/reference.md index 0f231dc3..f1eedd3e 100644 --- a/plugins/cli/permissions/autogenerated/reference.md +++ b/plugins/cli/permissions/autogenerated/reference.md @@ -1,14 +1,5 @@ -# Permissions - -## allow-cli-matches - -Enables the cli_matches command without any pre-configured scope. - -## deny-cli-matches - -Denies the cli_matches command without any pre-configured scope. - -## default - -Allows reading the CLI matches - +| Permission | Description | +|------|-----| +|`allow-cli-matches`|Enables the cli_matches command without any pre-configured scope.| +|`deny-cli-matches`|Denies the cli_matches command without any pre-configured scope.| +|`default`|Allows reading the CLI matches| diff --git a/plugins/cli/permissions/schemas/schema.json b/plugins/cli/permissions/schemas/schema.json index 47519c42..4552dc24 100644 --- a/plugins/cli/permissions/schemas/schema.json +++ b/plugins/cli/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/clipboard-manager/permissions/autogenerated/reference.md b/plugins/clipboard-manager/permissions/autogenerated/reference.md index 02d3e533..e2c16641 100644 --- a/plugins/clipboard-manager/permissions/autogenerated/reference.md +++ b/plugins/clipboard-manager/permissions/autogenerated/reference.md @@ -1,18 +1,6 @@ -# Permissions - -## allow-read - -Enables the read command without any pre-configured scope. - -## deny-read - -Denies the read command without any pre-configured scope. - -## allow-write - -Enables the write command without any pre-configured scope. - -## deny-write - -Denies the write command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-read`|Enables the read command without any pre-configured scope.| +|`deny-read`|Denies the read command without any pre-configured scope.| +|`allow-write`|Enables the write command without any pre-configured scope.| +|`deny-write`|Denies the write command without any pre-configured scope.| diff --git a/plugins/clipboard-manager/permissions/schemas/schema.json b/plugins/clipboard-manager/permissions/schemas/schema.json index 9691ab99..b96f7829 100644 --- a/plugins/clipboard-manager/permissions/schemas/schema.json +++ b/plugins/clipboard-manager/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/deep-link/permissions/autogenerated/reference.md b/plugins/deep-link/permissions/autogenerated/reference.md index d0791ef9..a60764a3 100644 --- a/plugins/deep-link/permissions/autogenerated/reference.md +++ b/plugins/deep-link/permissions/autogenerated/reference.md @@ -1,14 +1,5 @@ -# Permissions - -## allow-get-current - -Enables the get_current command without any pre-configured scope. - -## deny-get-current - -Denies the get_current command without any pre-configured scope. - -## default - -Allows reading the opened deep link via the get_current command - +| Permission | Description | +|------|-----| +|`allow-get-current`|Enables the get_current command without any pre-configured scope.| +|`deny-get-current`|Denies the get_current command without any pre-configured scope.| +|`default`|Allows reading the opened deep link via the get_current command| diff --git a/plugins/deep-link/permissions/schemas/schema.json b/plugins/deep-link/permissions/schemas/schema.json index 54b3e650..fc7a2d41 100644 --- a/plugins/deep-link/permissions/schemas/schema.json +++ b/plugins/deep-link/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/dialog/permissions/autogenerated/reference.md b/plugins/dialog/permissions/autogenerated/reference.md index 9c000f9e..0f5c9a7d 100644 --- a/plugins/dialog/permissions/autogenerated/reference.md +++ b/plugins/dialog/permissions/autogenerated/reference.md @@ -1,42 +1,12 @@ -# Permissions - -## allow-ask - -Enables the ask command without any pre-configured scope. - -## deny-ask - -Denies the ask command without any pre-configured scope. - -## allow-confirm - -Enables the confirm command without any pre-configured scope. - -## deny-confirm - -Denies the confirm command without any pre-configured scope. - -## allow-message - -Enables the message command without any pre-configured scope. - -## deny-message - -Denies the message command without any pre-configured scope. - -## allow-open - -Enables the open command without any pre-configured scope. - -## deny-open - -Denies the open command without any pre-configured scope. - -## allow-save - -Enables the save command without any pre-configured scope. - -## deny-save - -Denies the save command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-ask`|Enables the ask command without any pre-configured scope.| +|`deny-ask`|Denies the ask command without any pre-configured scope.| +|`allow-confirm`|Enables the confirm command without any pre-configured scope.| +|`deny-confirm`|Denies the confirm command without any pre-configured scope.| +|`allow-message`|Enables the message command without any pre-configured scope.| +|`deny-message`|Denies the message command without any pre-configured scope.| +|`allow-open`|Enables the open command without any pre-configured scope.| +|`deny-open`|Denies the open command without any pre-configured scope.| +|`allow-save`|Enables the save command without any pre-configured scope.| +|`deny-save`|Denies the save command without any pre-configured scope.| diff --git a/plugins/dialog/permissions/schemas/schema.json b/plugins/dialog/permissions/schemas/schema.json index 44d05f82..2b944e3e 100644 --- a/plugins/dialog/permissions/schemas/schema.json +++ b/plugins/dialog/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/fs/permissions/autogenerated/reference.md b/plugins/fs/permissions/autogenerated/reference.md index 6e1d78d8..753e2505 100644 --- a/plugins/fs/permissions/autogenerated/reference.md +++ b/plugins/fs/permissions/autogenerated/reference.md @@ -1,1100 +1,279 @@ -# Permissions - -## allow-app-read-recursive - -This allows full recursive read access to the complete `$APP` folder, files and subdirectories. - -## allow-app-write-recursive - -This allows full recusrive write access to the complete `$APP` folder, files and subdirectories. - -## allow-app-read - -This allows non-recursive read access to the `$APP` folder. - -## allow-app-write - -This allows non-recursive write access to the `$APP` folder. - -## allow-app-meta-recursive - -This allows read access to metadata of the `$APP` folder, including file listing and statistics. - -## allow-app-meta - -This allows read access to metadata of the `$APP` folder, including file listing and statistics. - -## scope-app-recursive - -This scope recursive access to the complete `$APP` folder, including sub directories and files. - -## scope-app - -This scope permits access to all files and list content of top level directories in the `$APP`folder. - -## scope-app-index - -This scope permits to list all files and folders in the `$APP`folder. - -## allow-appcache-read-recursive - -This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories. - -## allow-appcache-write-recursive - -This allows full recusrive write access to the complete `$APPCACHE` folder, files and subdirectories. - -## allow-appcache-read - -This allows non-recursive read access to the `$APPCACHE` folder. - -## allow-appcache-write - -This allows non-recursive write access to the `$APPCACHE` folder. - -## allow-appcache-meta-recursive - -This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics. - -## allow-appcache-meta - -This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics. - -## scope-appcache-recursive - -This scope recursive access to the complete `$APPCACHE` folder, including sub directories and files. - -## scope-appcache - -This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder. - -## scope-appcache-index - -This scope permits to list all files and folders in the `$APPCACHE`folder. - -## allow-appconfig-read-recursive - -This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories. - -## allow-appconfig-write-recursive - -This allows full recusrive write access to the complete `$APPCONFIG` folder, files and subdirectories. - -## allow-appconfig-read - -This allows non-recursive read access to the `$APPCONFIG` folder. - -## allow-appconfig-write - -This allows non-recursive write access to the `$APPCONFIG` folder. - -## allow-appconfig-meta-recursive - -This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics. - -## allow-appconfig-meta - -This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics. - -## scope-appconfig-recursive - -This scope recursive access to the complete `$APPCONFIG` folder, including sub directories and files. - -## scope-appconfig - -This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder. - -## scope-appconfig-index - -This scope permits to list all files and folders in the `$APPCONFIG`folder. - -## allow-appdata-read-recursive - -This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories. - -## allow-appdata-write-recursive - -This allows full recusrive write access to the complete `$APPDATA` folder, files and subdirectories. - -## allow-appdata-read - -This allows non-recursive read access to the `$APPDATA` folder. - -## allow-appdata-write - -This allows non-recursive write access to the `$APPDATA` folder. - -## allow-appdata-meta-recursive - -This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics. - -## allow-appdata-meta - -This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics. - -## scope-appdata-recursive - -This scope recursive access to the complete `$APPDATA` folder, including sub directories and files. - -## scope-appdata - -This scope permits access to all files and list content of top level directories in the `$APPDATA`folder. - -## scope-appdata-index - -This scope permits to list all files and folders in the `$APPDATA`folder. - -## allow-applocaldata-read-recursive - -This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories. - -## allow-applocaldata-write-recursive - -This allows full recusrive write access to the complete `$APPLOCALDATA` folder, files and subdirectories. - -## allow-applocaldata-read - -This allows non-recursive read access to the `$APPLOCALDATA` folder. - -## allow-applocaldata-write - -This allows non-recursive write access to the `$APPLOCALDATA` folder. - -## allow-applocaldata-meta-recursive - -This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics. - -## allow-applocaldata-meta - -This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics. - -## scope-applocaldata-recursive - -This scope recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files. - -## scope-applocaldata - -This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder. - -## scope-applocaldata-index - -This scope permits to list all files and folders in the `$APPLOCALDATA`folder. - -## allow-applog-read-recursive - -This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories. - -## allow-applog-write-recursive - -This allows full recusrive write access to the complete `$APPLOG` folder, files and subdirectories. - -## allow-applog-read - -This allows non-recursive read access to the `$APPLOG` folder. - -## allow-applog-write - -This allows non-recursive write access to the `$APPLOG` folder. - -## allow-applog-meta-recursive - -This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics. - -## allow-applog-meta - -This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics. - -## scope-applog-recursive - -This scope recursive access to the complete `$APPLOG` folder, including sub directories and files. - -## scope-applog - -This scope permits access to all files and list content of top level directories in the `$APPLOG`folder. - -## scope-applog-index - -This scope permits to list all files and folders in the `$APPLOG`folder. - -## allow-audio-read-recursive - -This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories. - -## allow-audio-write-recursive - -This allows full recusrive write access to the complete `$AUDIO` folder, files and subdirectories. - -## allow-audio-read - -This allows non-recursive read access to the `$AUDIO` folder. - -## allow-audio-write - -This allows non-recursive write access to the `$AUDIO` folder. - -## allow-audio-meta-recursive - -This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics. - -## allow-audio-meta - -This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics. - -## scope-audio-recursive - -This scope recursive access to the complete `$AUDIO` folder, including sub directories and files. - -## scope-audio - -This scope permits access to all files and list content of top level directories in the `$AUDIO`folder. - -## scope-audio-index - -This scope permits to list all files and folders in the `$AUDIO`folder. - -## allow-cache-read-recursive - -This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories. - -## allow-cache-write-recursive - -This allows full recusrive write access to the complete `$CACHE` folder, files and subdirectories. - -## allow-cache-read - -This allows non-recursive read access to the `$CACHE` folder. - -## allow-cache-write - -This allows non-recursive write access to the `$CACHE` folder. - -## allow-cache-meta-recursive - -This allows read access to metadata of the `$CACHE` folder, including file listing and statistics. - -## allow-cache-meta - -This allows read access to metadata of the `$CACHE` folder, including file listing and statistics. - -## scope-cache-recursive - -This scope recursive access to the complete `$CACHE` folder, including sub directories and files. - -## scope-cache - -This scope permits access to all files and list content of top level directories in the `$CACHE`folder. - -## scope-cache-index - -This scope permits to list all files and folders in the `$CACHE`folder. - -## allow-config-read-recursive - -This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories. - -## allow-config-write-recursive - -This allows full recusrive write access to the complete `$CONFIG` folder, files and subdirectories. - -## allow-config-read - -This allows non-recursive read access to the `$CONFIG` folder. - -## allow-config-write - -This allows non-recursive write access to the `$CONFIG` folder. - -## allow-config-meta-recursive - -This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics. - -## allow-config-meta - -This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics. - -## scope-config-recursive - -This scope recursive access to the complete `$CONFIG` folder, including sub directories and files. - -## scope-config - -This scope permits access to all files and list content of top level directories in the `$CONFIG`folder. - -## scope-config-index - -This scope permits to list all files and folders in the `$CONFIG`folder. - -## allow-data-read-recursive - -This allows full recursive read access to the complete `$DATA` folder, files and subdirectories. - -## allow-data-write-recursive - -This allows full recusrive write access to the complete `$DATA` folder, files and subdirectories. - -## allow-data-read - -This allows non-recursive read access to the `$DATA` folder. - -## allow-data-write - -This allows non-recursive write access to the `$DATA` folder. - -## allow-data-meta-recursive - -This allows read access to metadata of the `$DATA` folder, including file listing and statistics. - -## allow-data-meta - -This allows read access to metadata of the `$DATA` folder, including file listing and statistics. - -## scope-data-recursive - -This scope recursive access to the complete `$DATA` folder, including sub directories and files. - -## scope-data - -This scope permits access to all files and list content of top level directories in the `$DATA`folder. - -## scope-data-index - -This scope permits to list all files and folders in the `$DATA`folder. - -## allow-desktop-read-recursive - -This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories. - -## allow-desktop-write-recursive - -This allows full recusrive write access to the complete `$DESKTOP` folder, files and subdirectories. - -## allow-desktop-read - -This allows non-recursive read access to the `$DESKTOP` folder. - -## allow-desktop-write - -This allows non-recursive write access to the `$DESKTOP` folder. - -## allow-desktop-meta-recursive - -This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics. - -## allow-desktop-meta - -This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics. - -## scope-desktop-recursive - -This scope recursive access to the complete `$DESKTOP` folder, including sub directories and files. - -## scope-desktop - -This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder. - -## scope-desktop-index - -This scope permits to list all files and folders in the `$DESKTOP`folder. - -## allow-document-read-recursive - -This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories. - -## allow-document-write-recursive - -This allows full recusrive write access to the complete `$DOCUMENT` folder, files and subdirectories. - -## allow-document-read - -This allows non-recursive read access to the `$DOCUMENT` folder. - -## allow-document-write - -This allows non-recursive write access to the `$DOCUMENT` folder. - -## allow-document-meta-recursive - -This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics. - -## allow-document-meta - -This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics. - -## scope-document-recursive - -This scope recursive access to the complete `$DOCUMENT` folder, including sub directories and files. - -## scope-document - -This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder. - -## scope-document-index - -This scope permits to list all files and folders in the `$DOCUMENT`folder. - -## allow-download-read-recursive - -This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories. - -## allow-download-write-recursive - -This allows full recusrive write access to the complete `$DOWNLOAD` folder, files and subdirectories. - -## allow-download-read - -This allows non-recursive read access to the `$DOWNLOAD` folder. - -## allow-download-write - -This allows non-recursive write access to the `$DOWNLOAD` folder. - -## allow-download-meta-recursive - -This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics. - -## allow-download-meta - -This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics. - -## scope-download-recursive - -This scope recursive access to the complete `$DOWNLOAD` folder, including sub directories and files. - -## scope-download - -This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder. - -## scope-download-index - -This scope permits to list all files and folders in the `$DOWNLOAD`folder. - -## allow-exe-read-recursive - -This allows full recursive read access to the complete `$EXE` folder, files and subdirectories. - -## allow-exe-write-recursive - -This allows full recusrive write access to the complete `$EXE` folder, files and subdirectories. - -## allow-exe-read - -This allows non-recursive read access to the `$EXE` folder. - -## allow-exe-write - -This allows non-recursive write access to the `$EXE` folder. - -## allow-exe-meta-recursive - -This allows read access to metadata of the `$EXE` folder, including file listing and statistics. - -## allow-exe-meta - -This allows read access to metadata of the `$EXE` folder, including file listing and statistics. - -## scope-exe-recursive - -This scope recursive access to the complete `$EXE` folder, including sub directories and files. - -## scope-exe - -This scope permits access to all files and list content of top level directories in the `$EXE`folder. - -## scope-exe-index - -This scope permits to list all files and folders in the `$EXE`folder. - -## allow-font-read-recursive - -This allows full recursive read access to the complete `$FONT` folder, files and subdirectories. - -## allow-font-write-recursive - -This allows full recusrive write access to the complete `$FONT` folder, files and subdirectories. - -## allow-font-read - -This allows non-recursive read access to the `$FONT` folder. - -## allow-font-write - -This allows non-recursive write access to the `$FONT` folder. - -## allow-font-meta-recursive - -This allows read access to metadata of the `$FONT` folder, including file listing and statistics. - -## allow-font-meta - -This allows read access to metadata of the `$FONT` folder, including file listing and statistics. - -## scope-font-recursive - -This scope recursive access to the complete `$FONT` folder, including sub directories and files. - -## scope-font - -This scope permits access to all files and list content of top level directories in the `$FONT`folder. - -## scope-font-index - -This scope permits to list all files and folders in the `$FONT`folder. - -## allow-home-read-recursive - -This allows full recursive read access to the complete `$HOME` folder, files and subdirectories. - -## allow-home-write-recursive - -This allows full recusrive write access to the complete `$HOME` folder, files and subdirectories. - -## allow-home-read - -This allows non-recursive read access to the `$HOME` folder. - -## allow-home-write - -This allows non-recursive write access to the `$HOME` folder. - -## allow-home-meta-recursive - -This allows read access to metadata of the `$HOME` folder, including file listing and statistics. - -## allow-home-meta - -This allows read access to metadata of the `$HOME` folder, including file listing and statistics. - -## scope-home-recursive - -This scope recursive access to the complete `$HOME` folder, including sub directories and files. - -## scope-home - -This scope permits access to all files and list content of top level directories in the `$HOME`folder. - -## scope-home-index - -This scope permits to list all files and folders in the `$HOME`folder. - -## allow-localdata-read-recursive - -This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories. - -## allow-localdata-write-recursive - -This allows full recusrive write access to the complete `$LOCALDATA` folder, files and subdirectories. - -## allow-localdata-read - -This allows non-recursive read access to the `$LOCALDATA` folder. - -## allow-localdata-write - -This allows non-recursive write access to the `$LOCALDATA` folder. - -## allow-localdata-meta-recursive - -This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics. - -## allow-localdata-meta - -This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics. - -## scope-localdata-recursive - -This scope recursive access to the complete `$LOCALDATA` folder, including sub directories and files. - -## scope-localdata - -This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder. - -## scope-localdata-index - -This scope permits to list all files and folders in the `$LOCALDATA`folder. - -## allow-log-read-recursive - -This allows full recursive read access to the complete `$LOG` folder, files and subdirectories. - -## allow-log-write-recursive - -This allows full recusrive write access to the complete `$LOG` folder, files and subdirectories. - -## allow-log-read - -This allows non-recursive read access to the `$LOG` folder. - -## allow-log-write - -This allows non-recursive write access to the `$LOG` folder. - -## allow-log-meta-recursive - -This allows read access to metadata of the `$LOG` folder, including file listing and statistics. - -## allow-log-meta - -This allows read access to metadata of the `$LOG` folder, including file listing and statistics. - -## scope-log-recursive - -This scope recursive access to the complete `$LOG` folder, including sub directories and files. - -## scope-log - -This scope permits access to all files and list content of top level directories in the `$LOG`folder. - -## scope-log-index - -This scope permits to list all files and folders in the `$LOG`folder. - -## allow-picture-read-recursive - -This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories. - -## allow-picture-write-recursive - -This allows full recusrive write access to the complete `$PICTURE` folder, files and subdirectories. - -## allow-picture-read - -This allows non-recursive read access to the `$PICTURE` folder. - -## allow-picture-write - -This allows non-recursive write access to the `$PICTURE` folder. - -## allow-picture-meta-recursive - -This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics. - -## allow-picture-meta - -This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics. - -## scope-picture-recursive - -This scope recursive access to the complete `$PICTURE` folder, including sub directories and files. - -## scope-picture - -This scope permits access to all files and list content of top level directories in the `$PICTURE`folder. - -## scope-picture-index - -This scope permits to list all files and folders in the `$PICTURE`folder. - -## allow-public-read-recursive - -This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories. - -## allow-public-write-recursive - -This allows full recusrive write access to the complete `$PUBLIC` folder, files and subdirectories. - -## allow-public-read - -This allows non-recursive read access to the `$PUBLIC` folder. - -## allow-public-write - -This allows non-recursive write access to the `$PUBLIC` folder. - -## allow-public-meta-recursive - -This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics. - -## allow-public-meta - -This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics. - -## scope-public-recursive - -This scope recursive access to the complete `$PUBLIC` folder, including sub directories and files. - -## scope-public - -This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder. - -## scope-public-index - -This scope permits to list all files and folders in the `$PUBLIC`folder. - -## allow-resource-read-recursive - -This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories. - -## allow-resource-write-recursive - -This allows full recusrive write access to the complete `$RESOURCE` folder, files and subdirectories. - -## allow-resource-read - -This allows non-recursive read access to the `$RESOURCE` folder. - -## allow-resource-write - -This allows non-recursive write access to the `$RESOURCE` folder. - -## allow-resource-meta-recursive - -This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics. - -## allow-resource-meta - -This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics. - -## scope-resource-recursive - -This scope recursive access to the complete `$RESOURCE` folder, including sub directories and files. - -## scope-resource - -This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder. - -## scope-resource-index - -This scope permits to list all files and folders in the `$RESOURCE`folder. - -## allow-runtime-read-recursive - -This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories. - -## allow-runtime-write-recursive - -This allows full recusrive write access to the complete `$RUNTIME` folder, files and subdirectories. - -## allow-runtime-read - -This allows non-recursive read access to the `$RUNTIME` folder. - -## allow-runtime-write - -This allows non-recursive write access to the `$RUNTIME` folder. - -## allow-runtime-meta-recursive - -This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics. - -## allow-runtime-meta - -This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics. - -## scope-runtime-recursive - -This scope recursive access to the complete `$RUNTIME` folder, including sub directories and files. - -## scope-runtime - -This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder. - -## scope-runtime-index - -This scope permits to list all files and folders in the `$RUNTIME`folder. - -## allow-temp-read-recursive - -This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories. - -## allow-temp-write-recursive - -This allows full recusrive write access to the complete `$TEMP` folder, files and subdirectories. - -## allow-temp-read - -This allows non-recursive read access to the `$TEMP` folder. - -## allow-temp-write - -This allows non-recursive write access to the `$TEMP` folder. - -## allow-temp-meta-recursive - -This allows read access to metadata of the `$TEMP` folder, including file listing and statistics. - -## allow-temp-meta - -This allows read access to metadata of the `$TEMP` folder, including file listing and statistics. - -## scope-temp-recursive - -This scope recursive access to the complete `$TEMP` folder, including sub directories and files. - -## scope-temp - -This scope permits access to all files and list content of top level directories in the `$TEMP`folder. - -## scope-temp-index - -This scope permits to list all files and folders in the `$TEMP`folder. - -## allow-template-read-recursive - -This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories. - -## allow-template-write-recursive - -This allows full recusrive write access to the complete `$TEMPLATE` folder, files and subdirectories. - -## allow-template-read - -This allows non-recursive read access to the `$TEMPLATE` folder. - -## allow-template-write - -This allows non-recursive write access to the `$TEMPLATE` folder. - -## allow-template-meta-recursive - -This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics. - -## allow-template-meta - -This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics. - -## scope-template-recursive - -This scope recursive access to the complete `$TEMPLATE` folder, including sub directories and files. - -## scope-template - -This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder. - -## scope-template-index - -This scope permits to list all files and folders in the `$TEMPLATE`folder. - -## allow-video-read-recursive - -This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories. - -## allow-video-write-recursive - -This allows full recusrive write access to the complete `$VIDEO` folder, files and subdirectories. - -## allow-video-read - -This allows non-recursive read access to the `$VIDEO` folder. - -## allow-video-write - -This allows non-recursive write access to the `$VIDEO` folder. - -## allow-video-meta-recursive - -This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics. - -## allow-video-meta - -This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics. - -## scope-video-recursive - -This scope recursive access to the complete `$VIDEO` folder, including sub directories and files. - -## scope-video - -This scope permits access to all files and list content of top level directories in the `$VIDEO`folder. - -## scope-video-index - -This scope permits to list all files and folders in the `$VIDEO`folder. - -## allow-copy-file - -Enables the copy_file command without any pre-configured scope. - -## deny-copy-file - -Denies the copy_file command without any pre-configured scope. - -## allow-create - -Enables the create command without any pre-configured scope. - -## deny-create - -Denies the create command without any pre-configured scope. - -## allow-exists - -Enables the exists command without any pre-configured scope. - -## deny-exists - -Denies the exists command without any pre-configured scope. - -## allow-fstat - -Enables the fstat command without any pre-configured scope. - -## deny-fstat - -Denies the fstat command without any pre-configured scope. - -## allow-ftruncate - -Enables the ftruncate command without any pre-configured scope. - -## deny-ftruncate - -Denies the ftruncate command without any pre-configured scope. - -## allow-lstat - -Enables the lstat command without any pre-configured scope. - -## deny-lstat - -Denies the lstat command without any pre-configured scope. - -## allow-mkdir - -Enables the mkdir command without any pre-configured scope. - -## deny-mkdir - -Denies the mkdir command without any pre-configured scope. - -## allow-open - -Enables the open command without any pre-configured scope. - -## deny-open - -Denies the open command without any pre-configured scope. - -## allow-read - -Enables the read command without any pre-configured scope. - -## deny-read - -Denies the read command without any pre-configured scope. - -## allow-read-dir - -Enables the read_dir command without any pre-configured scope. - -## deny-read-dir - -Denies the read_dir command without any pre-configured scope. - -## allow-read-file - -Enables the read_file command without any pre-configured scope. - -## deny-read-file - -Denies the read_file command without any pre-configured scope. - -## allow-read-text-file - -Enables the read_text_file command without any pre-configured scope. - -## deny-read-text-file - -Denies the read_text_file command without any pre-configured scope. - -## allow-read-text-file-lines - -Enables the read_text_file_lines command without any pre-configured scope. - -## deny-read-text-file-lines - -Denies the read_text_file_lines command without any pre-configured scope. - -## allow-read-text-file-lines-next - -Enables the read_text_file_lines_next command without any pre-configured scope. - -## deny-read-text-file-lines-next - -Denies the read_text_file_lines_next command without any pre-configured scope. - -## allow-remove - -Enables the remove command without any pre-configured scope. - -## deny-remove - -Denies the remove command without any pre-configured scope. - -## allow-rename - -Enables the rename command without any pre-configured scope. - -## deny-rename - -Denies the rename command without any pre-configured scope. - -## allow-seek - -Enables the seek command without any pre-configured scope. - -## deny-seek - -Denies the seek command without any pre-configured scope. - -## allow-stat - -Enables the stat command without any pre-configured scope. - -## deny-stat - -Denies the stat command without any pre-configured scope. - -## allow-truncate - -Enables the truncate command without any pre-configured scope. - -## deny-truncate - -Denies the truncate command without any pre-configured scope. - -## allow-unwatch - -Enables the unwatch command without any pre-configured scope. - -## deny-unwatch - -Denies the unwatch command without any pre-configured scope. - -## allow-watch - -Enables the watch command without any pre-configured scope. - -## deny-watch - -Denies the watch command without any pre-configured scope. - -## allow-write - -Enables the write command without any pre-configured scope. - -## deny-write - -Denies the write command without any pre-configured scope. - -## allow-write-file - -Enables the write_file command without any pre-configured scope. - -## deny-write-file - -Denies the write_file command without any pre-configured scope. - -## allow-write-text-file - -Enables the write_text_file command without any pre-configured scope. - -## deny-write-text-file - -Denies the write_text_file command without any pre-configured scope. - -## default - -# Tauri `fs` default permissions +| Permission | Description | +|------|-----| +|`allow-app-read-recursive`|This allows full recursive read access to the complete `$APP` folder, files and subdirectories.| +|`allow-app-write-recursive`|This allows full recusrive write access to the complete `$APP` folder, files and subdirectories.| +|`allow-app-read`|This allows non-recursive read access to the `$APP` folder.| +|`allow-app-write`|This allows non-recursive write access to the `$APP` folder.| +|`allow-app-meta-recursive`|This allows read access to metadata of the `$APP` folder, including file listing and statistics.| +|`allow-app-meta`|This allows read access to metadata of the `$APP` folder, including file listing and statistics.| +|`scope-app-recursive`|This scope recursive access to the complete `$APP` folder, including sub directories and files.| +|`scope-app`|This scope permits access to all files and list content of top level directories in the `$APP`folder.| +|`scope-app-index`|This scope permits to list all files and folders in the `$APP`folder.| +|`allow-appcache-read-recursive`|This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories.| +|`allow-appcache-write-recursive`|This allows full recusrive write access to the complete `$APPCACHE` folder, files and subdirectories.| +|`allow-appcache-read`|This allows non-recursive read access to the `$APPCACHE` folder.| +|`allow-appcache-write`|This allows non-recursive write access to the `$APPCACHE` folder.| +|`allow-appcache-meta-recursive`|This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics.| +|`allow-appcache-meta`|This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics.| +|`scope-appcache-recursive`|This scope recursive access to the complete `$APPCACHE` folder, including sub directories and files.| +|`scope-appcache`|This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder.| +|`scope-appcache-index`|This scope permits to list all files and folders in the `$APPCACHE`folder.| +|`allow-appconfig-read-recursive`|This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories.| +|`allow-appconfig-write-recursive`|This allows full recusrive write access to the complete `$APPCONFIG` folder, files and subdirectories.| +|`allow-appconfig-read`|This allows non-recursive read access to the `$APPCONFIG` folder.| +|`allow-appconfig-write`|This allows non-recursive write access to the `$APPCONFIG` folder.| +|`allow-appconfig-meta-recursive`|This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.| +|`allow-appconfig-meta`|This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.| +|`scope-appconfig-recursive`|This scope recursive access to the complete `$APPCONFIG` folder, including sub directories and files.| +|`scope-appconfig`|This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder.| +|`scope-appconfig-index`|This scope permits to list all files and folders in the `$APPCONFIG`folder.| +|`allow-appdata-read-recursive`|This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories.| +|`allow-appdata-write-recursive`|This allows full recusrive write access to the complete `$APPDATA` folder, files and subdirectories.| +|`allow-appdata-read`|This allows non-recursive read access to the `$APPDATA` folder.| +|`allow-appdata-write`|This allows non-recursive write access to the `$APPDATA` folder.| +|`allow-appdata-meta-recursive`|This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics.| +|`allow-appdata-meta`|This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics.| +|`scope-appdata-recursive`|This scope recursive access to the complete `$APPDATA` folder, including sub directories and files.| +|`scope-appdata`|This scope permits access to all files and list content of top level directories in the `$APPDATA`folder.| +|`scope-appdata-index`|This scope permits to list all files and folders in the `$APPDATA`folder.| +|`allow-applocaldata-read-recursive`|This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories.| +|`allow-applocaldata-write-recursive`|This allows full recusrive write access to the complete `$APPLOCALDATA` folder, files and subdirectories.| +|`allow-applocaldata-read`|This allows non-recursive read access to the `$APPLOCALDATA` folder.| +|`allow-applocaldata-write`|This allows non-recursive write access to the `$APPLOCALDATA` folder.| +|`allow-applocaldata-meta-recursive`|This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.| +|`allow-applocaldata-meta`|This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.| +|`scope-applocaldata-recursive`|This scope recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files.| +|`scope-applocaldata`|This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder.| +|`scope-applocaldata-index`|This scope permits to list all files and folders in the `$APPLOCALDATA`folder.| +|`allow-applog-read-recursive`|This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories.| +|`allow-applog-write-recursive`|This allows full recusrive write access to the complete `$APPLOG` folder, files and subdirectories.| +|`allow-applog-read`|This allows non-recursive read access to the `$APPLOG` folder.| +|`allow-applog-write`|This allows non-recursive write access to the `$APPLOG` folder.| +|`allow-applog-meta-recursive`|This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics.| +|`allow-applog-meta`|This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics.| +|`scope-applog-recursive`|This scope recursive access to the complete `$APPLOG` folder, including sub directories and files.| +|`scope-applog`|This scope permits access to all files and list content of top level directories in the `$APPLOG`folder.| +|`scope-applog-index`|This scope permits to list all files and folders in the `$APPLOG`folder.| +|`allow-audio-read-recursive`|This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories.| +|`allow-audio-write-recursive`|This allows full recusrive write access to the complete `$AUDIO` folder, files and subdirectories.| +|`allow-audio-read`|This allows non-recursive read access to the `$AUDIO` folder.| +|`allow-audio-write`|This allows non-recursive write access to the `$AUDIO` folder.| +|`allow-audio-meta-recursive`|This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics.| +|`allow-audio-meta`|This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics.| +|`scope-audio-recursive`|This scope recursive access to the complete `$AUDIO` folder, including sub directories and files.| +|`scope-audio`|This scope permits access to all files and list content of top level directories in the `$AUDIO`folder.| +|`scope-audio-index`|This scope permits to list all files and folders in the `$AUDIO`folder.| +|`allow-cache-read-recursive`|This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories.| +|`allow-cache-write-recursive`|This allows full recusrive write access to the complete `$CACHE` folder, files and subdirectories.| +|`allow-cache-read`|This allows non-recursive read access to the `$CACHE` folder.| +|`allow-cache-write`|This allows non-recursive write access to the `$CACHE` folder.| +|`allow-cache-meta-recursive`|This allows read access to metadata of the `$CACHE` folder, including file listing and statistics.| +|`allow-cache-meta`|This allows read access to metadata of the `$CACHE` folder, including file listing and statistics.| +|`scope-cache-recursive`|This scope recursive access to the complete `$CACHE` folder, including sub directories and files.| +|`scope-cache`|This scope permits access to all files and list content of top level directories in the `$CACHE`folder.| +|`scope-cache-index`|This scope permits to list all files and folders in the `$CACHE`folder.| +|`allow-config-read-recursive`|This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories.| +|`allow-config-write-recursive`|This allows full recusrive write access to the complete `$CONFIG` folder, files and subdirectories.| +|`allow-config-read`|This allows non-recursive read access to the `$CONFIG` folder.| +|`allow-config-write`|This allows non-recursive write access to the `$CONFIG` folder.| +|`allow-config-meta-recursive`|This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics.| +|`allow-config-meta`|This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics.| +|`scope-config-recursive`|This scope recursive access to the complete `$CONFIG` folder, including sub directories and files.| +|`scope-config`|This scope permits access to all files and list content of top level directories in the `$CONFIG`folder.| +|`scope-config-index`|This scope permits to list all files and folders in the `$CONFIG`folder.| +|`allow-data-read-recursive`|This allows full recursive read access to the complete `$DATA` folder, files and subdirectories.| +|`allow-data-write-recursive`|This allows full recusrive write access to the complete `$DATA` folder, files and subdirectories.| +|`allow-data-read`|This allows non-recursive read access to the `$DATA` folder.| +|`allow-data-write`|This allows non-recursive write access to the `$DATA` folder.| +|`allow-data-meta-recursive`|This allows read access to metadata of the `$DATA` folder, including file listing and statistics.| +|`allow-data-meta`|This allows read access to metadata of the `$DATA` folder, including file listing and statistics.| +|`scope-data-recursive`|This scope recursive access to the complete `$DATA` folder, including sub directories and files.| +|`scope-data`|This scope permits access to all files and list content of top level directories in the `$DATA`folder.| +|`scope-data-index`|This scope permits to list all files and folders in the `$DATA`folder.| +|`allow-desktop-read-recursive`|This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories.| +|`allow-desktop-write-recursive`|This allows full recusrive write access to the complete `$DESKTOP` folder, files and subdirectories.| +|`allow-desktop-read`|This allows non-recursive read access to the `$DESKTOP` folder.| +|`allow-desktop-write`|This allows non-recursive write access to the `$DESKTOP` folder.| +|`allow-desktop-meta-recursive`|This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics.| +|`allow-desktop-meta`|This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics.| +|`scope-desktop-recursive`|This scope recursive access to the complete `$DESKTOP` folder, including sub directories and files.| +|`scope-desktop`|This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder.| +|`scope-desktop-index`|This scope permits to list all files and folders in the `$DESKTOP`folder.| +|`allow-document-read-recursive`|This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories.| +|`allow-document-write-recursive`|This allows full recusrive write access to the complete `$DOCUMENT` folder, files and subdirectories.| +|`allow-document-read`|This allows non-recursive read access to the `$DOCUMENT` folder.| +|`allow-document-write`|This allows non-recursive write access to the `$DOCUMENT` folder.| +|`allow-document-meta-recursive`|This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.| +|`allow-document-meta`|This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.| +|`scope-document-recursive`|This scope recursive access to the complete `$DOCUMENT` folder, including sub directories and files.| +|`scope-document`|This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder.| +|`scope-document-index`|This scope permits to list all files and folders in the `$DOCUMENT`folder.| +|`allow-download-read-recursive`|This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories.| +|`allow-download-write-recursive`|This allows full recusrive write access to the complete `$DOWNLOAD` folder, files and subdirectories.| +|`allow-download-read`|This allows non-recursive read access to the `$DOWNLOAD` folder.| +|`allow-download-write`|This allows non-recursive write access to the `$DOWNLOAD` folder.| +|`allow-download-meta-recursive`|This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.| +|`allow-download-meta`|This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.| +|`scope-download-recursive`|This scope recursive access to the complete `$DOWNLOAD` folder, including sub directories and files.| +|`scope-download`|This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder.| +|`scope-download-index`|This scope permits to list all files and folders in the `$DOWNLOAD`folder.| +|`allow-exe-read-recursive`|This allows full recursive read access to the complete `$EXE` folder, files and subdirectories.| +|`allow-exe-write-recursive`|This allows full recusrive write access to the complete `$EXE` folder, files and subdirectories.| +|`allow-exe-read`|This allows non-recursive read access to the `$EXE` folder.| +|`allow-exe-write`|This allows non-recursive write access to the `$EXE` folder.| +|`allow-exe-meta-recursive`|This allows read access to metadata of the `$EXE` folder, including file listing and statistics.| +|`allow-exe-meta`|This allows read access to metadata of the `$EXE` folder, including file listing and statistics.| +|`scope-exe-recursive`|This scope recursive access to the complete `$EXE` folder, including sub directories and files.| +|`scope-exe`|This scope permits access to all files and list content of top level directories in the `$EXE`folder.| +|`scope-exe-index`|This scope permits to list all files and folders in the `$EXE`folder.| +|`allow-font-read-recursive`|This allows full recursive read access to the complete `$FONT` folder, files and subdirectories.| +|`allow-font-write-recursive`|This allows full recusrive write access to the complete `$FONT` folder, files and subdirectories.| +|`allow-font-read`|This allows non-recursive read access to the `$FONT` folder.| +|`allow-font-write`|This allows non-recursive write access to the `$FONT` folder.| +|`allow-font-meta-recursive`|This allows read access to metadata of the `$FONT` folder, including file listing and statistics.| +|`allow-font-meta`|This allows read access to metadata of the `$FONT` folder, including file listing and statistics.| +|`scope-font-recursive`|This scope recursive access to the complete `$FONT` folder, including sub directories and files.| +|`scope-font`|This scope permits access to all files and list content of top level directories in the `$FONT`folder.| +|`scope-font-index`|This scope permits to list all files and folders in the `$FONT`folder.| +|`allow-home-read-recursive`|This allows full recursive read access to the complete `$HOME` folder, files and subdirectories.| +|`allow-home-write-recursive`|This allows full recusrive write access to the complete `$HOME` folder, files and subdirectories.| +|`allow-home-read`|This allows non-recursive read access to the `$HOME` folder.| +|`allow-home-write`|This allows non-recursive write access to the `$HOME` folder.| +|`allow-home-meta-recursive`|This allows read access to metadata of the `$HOME` folder, including file listing and statistics.| +|`allow-home-meta`|This allows read access to metadata of the `$HOME` folder, including file listing and statistics.| +|`scope-home-recursive`|This scope recursive access to the complete `$HOME` folder, including sub directories and files.| +|`scope-home`|This scope permits access to all files and list content of top level directories in the `$HOME`folder.| +|`scope-home-index`|This scope permits to list all files and folders in the `$HOME`folder.| +|`allow-localdata-read-recursive`|This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories.| +|`allow-localdata-write-recursive`|This allows full recusrive write access to the complete `$LOCALDATA` folder, files and subdirectories.| +|`allow-localdata-read`|This allows non-recursive read access to the `$LOCALDATA` folder.| +|`allow-localdata-write`|This allows non-recursive write access to the `$LOCALDATA` folder.| +|`allow-localdata-meta-recursive`|This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.| +|`allow-localdata-meta`|This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.| +|`scope-localdata-recursive`|This scope recursive access to the complete `$LOCALDATA` folder, including sub directories and files.| +|`scope-localdata`|This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder.| +|`scope-localdata-index`|This scope permits to list all files and folders in the `$LOCALDATA`folder.| +|`allow-log-read-recursive`|This allows full recursive read access to the complete `$LOG` folder, files and subdirectories.| +|`allow-log-write-recursive`|This allows full recusrive write access to the complete `$LOG` folder, files and subdirectories.| +|`allow-log-read`|This allows non-recursive read access to the `$LOG` folder.| +|`allow-log-write`|This allows non-recursive write access to the `$LOG` folder.| +|`allow-log-meta-recursive`|This allows read access to metadata of the `$LOG` folder, including file listing and statistics.| +|`allow-log-meta`|This allows read access to metadata of the `$LOG` folder, including file listing and statistics.| +|`scope-log-recursive`|This scope recursive access to the complete `$LOG` folder, including sub directories and files.| +|`scope-log`|This scope permits access to all files and list content of top level directories in the `$LOG`folder.| +|`scope-log-index`|This scope permits to list all files and folders in the `$LOG`folder.| +|`allow-picture-read-recursive`|This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories.| +|`allow-picture-write-recursive`|This allows full recusrive write access to the complete `$PICTURE` folder, files and subdirectories.| +|`allow-picture-read`|This allows non-recursive read access to the `$PICTURE` folder.| +|`allow-picture-write`|This allows non-recursive write access to the `$PICTURE` folder.| +|`allow-picture-meta-recursive`|This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics.| +|`allow-picture-meta`|This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics.| +|`scope-picture-recursive`|This scope recursive access to the complete `$PICTURE` folder, including sub directories and files.| +|`scope-picture`|This scope permits access to all files and list content of top level directories in the `$PICTURE`folder.| +|`scope-picture-index`|This scope permits to list all files and folders in the `$PICTURE`folder.| +|`allow-public-read-recursive`|This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories.| +|`allow-public-write-recursive`|This allows full recusrive write access to the complete `$PUBLIC` folder, files and subdirectories.| +|`allow-public-read`|This allows non-recursive read access to the `$PUBLIC` folder.| +|`allow-public-write`|This allows non-recursive write access to the `$PUBLIC` folder.| +|`allow-public-meta-recursive`|This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics.| +|`allow-public-meta`|This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics.| +|`scope-public-recursive`|This scope recursive access to the complete `$PUBLIC` folder, including sub directories and files.| +|`scope-public`|This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder.| +|`scope-public-index`|This scope permits to list all files and folders in the `$PUBLIC`folder.| +|`allow-resource-read-recursive`|This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories.| +|`allow-resource-write-recursive`|This allows full recusrive write access to the complete `$RESOURCE` folder, files and subdirectories.| +|`allow-resource-read`|This allows non-recursive read access to the `$RESOURCE` folder.| +|`allow-resource-write`|This allows non-recursive write access to the `$RESOURCE` folder.| +|`allow-resource-meta-recursive`|This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics.| +|`allow-resource-meta`|This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics.| +|`scope-resource-recursive`|This scope recursive access to the complete `$RESOURCE` folder, including sub directories and files.| +|`scope-resource`|This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder.| +|`scope-resource-index`|This scope permits to list all files and folders in the `$RESOURCE`folder.| +|`allow-runtime-read-recursive`|This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories.| +|`allow-runtime-write-recursive`|This allows full recusrive write access to the complete `$RUNTIME` folder, files and subdirectories.| +|`allow-runtime-read`|This allows non-recursive read access to the `$RUNTIME` folder.| +|`allow-runtime-write`|This allows non-recursive write access to the `$RUNTIME` folder.| +|`allow-runtime-meta-recursive`|This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics.| +|`allow-runtime-meta`|This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics.| +|`scope-runtime-recursive`|This scope recursive access to the complete `$RUNTIME` folder, including sub directories and files.| +|`scope-runtime`|This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder.| +|`scope-runtime-index`|This scope permits to list all files and folders in the `$RUNTIME`folder.| +|`allow-temp-read-recursive`|This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories.| +|`allow-temp-write-recursive`|This allows full recusrive write access to the complete `$TEMP` folder, files and subdirectories.| +|`allow-temp-read`|This allows non-recursive read access to the `$TEMP` folder.| +|`allow-temp-write`|This allows non-recursive write access to the `$TEMP` folder.| +|`allow-temp-meta-recursive`|This allows read access to metadata of the `$TEMP` folder, including file listing and statistics.| +|`allow-temp-meta`|This allows read access to metadata of the `$TEMP` folder, including file listing and statistics.| +|`scope-temp-recursive`|This scope recursive access to the complete `$TEMP` folder, including sub directories and files.| +|`scope-temp`|This scope permits access to all files and list content of top level directories in the `$TEMP`folder.| +|`scope-temp-index`|This scope permits to list all files and folders in the `$TEMP`folder.| +|`allow-template-read-recursive`|This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories.| +|`allow-template-write-recursive`|This allows full recusrive write access to the complete `$TEMPLATE` folder, files and subdirectories.| +|`allow-template-read`|This allows non-recursive read access to the `$TEMPLATE` folder.| +|`allow-template-write`|This allows non-recursive write access to the `$TEMPLATE` folder.| +|`allow-template-meta-recursive`|This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.| +|`allow-template-meta`|This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.| +|`scope-template-recursive`|This scope recursive access to the complete `$TEMPLATE` folder, including sub directories and files.| +|`scope-template`|This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder.| +|`scope-template-index`|This scope permits to list all files and folders in the `$TEMPLATE`folder.| +|`allow-video-read-recursive`|This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories.| +|`allow-video-write-recursive`|This allows full recusrive write access to the complete `$VIDEO` folder, files and subdirectories.| +|`allow-video-read`|This allows non-recursive read access to the `$VIDEO` folder.| +|`allow-video-write`|This allows non-recursive write access to the `$VIDEO` folder.| +|`allow-video-meta-recursive`|This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics.| +|`allow-video-meta`|This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics.| +|`scope-video-recursive`|This scope recursive access to the complete `$VIDEO` folder, including sub directories and files.| +|`scope-video`|This scope permits access to all files and list content of top level directories in the `$VIDEO`folder.| +|`scope-video-index`|This scope permits to list all files and folders in the `$VIDEO`folder.| +|`allow-copy-file`|Enables the copy_file command without any pre-configured scope.| +|`deny-copy-file`|Denies the copy_file command without any pre-configured scope.| +|`allow-create`|Enables the create command without any pre-configured scope.| +|`deny-create`|Denies the create command without any pre-configured scope.| +|`allow-exists`|Enables the exists command without any pre-configured scope.| +|`deny-exists`|Denies the exists command without any pre-configured scope.| +|`allow-fstat`|Enables the fstat command without any pre-configured scope.| +|`deny-fstat`|Denies the fstat command without any pre-configured scope.| +|`allow-ftruncate`|Enables the ftruncate command without any pre-configured scope.| +|`deny-ftruncate`|Denies the ftruncate command without any pre-configured scope.| +|`allow-lstat`|Enables the lstat command without any pre-configured scope.| +|`deny-lstat`|Denies the lstat command without any pre-configured scope.| +|`allow-mkdir`|Enables the mkdir command without any pre-configured scope.| +|`deny-mkdir`|Denies the mkdir command without any pre-configured scope.| +|`allow-open`|Enables the open command without any pre-configured scope.| +|`deny-open`|Denies the open command without any pre-configured scope.| +|`allow-read`|Enables the read command without any pre-configured scope.| +|`deny-read`|Denies the read command without any pre-configured scope.| +|`allow-read-dir`|Enables the read_dir command without any pre-configured scope.| +|`deny-read-dir`|Denies the read_dir command without any pre-configured scope.| +|`allow-read-file`|Enables the read_file command without any pre-configured scope.| +|`deny-read-file`|Denies the read_file command without any pre-configured scope.| +|`allow-read-text-file`|Enables the read_text_file command without any pre-configured scope.| +|`deny-read-text-file`|Denies the read_text_file command without any pre-configured scope.| +|`allow-read-text-file-lines`|Enables the read_text_file_lines command without any pre-configured scope.| +|`deny-read-text-file-lines`|Denies the read_text_file_lines command without any pre-configured scope.| +|`allow-read-text-file-lines-next`|Enables the read_text_file_lines_next command without any pre-configured scope.| +|`deny-read-text-file-lines-next`|Denies the read_text_file_lines_next command without any pre-configured scope.| +|`allow-remove`|Enables the remove command without any pre-configured scope.| +|`deny-remove`|Denies the remove command without any pre-configured scope.| +|`allow-rename`|Enables the rename command without any pre-configured scope.| +|`deny-rename`|Denies the rename command without any pre-configured scope.| +|`allow-seek`|Enables the seek command without any pre-configured scope.| +|`deny-seek`|Denies the seek command without any pre-configured scope.| +|`allow-stat`|Enables the stat command without any pre-configured scope.| +|`deny-stat`|Denies the stat command without any pre-configured scope.| +|`allow-truncate`|Enables the truncate command without any pre-configured scope.| +|`deny-truncate`|Denies the truncate command without any pre-configured scope.| +|`allow-unwatch`|Enables the unwatch command without any pre-configured scope.| +|`deny-unwatch`|Denies the unwatch command without any pre-configured scope.| +|`allow-watch`|Enables the watch command without any pre-configured scope.| +|`deny-watch`|Denies the watch command without any pre-configured scope.| +|`allow-write`|Enables the write command without any pre-configured scope.| +|`deny-write`|Denies the write command without any pre-configured scope.| +|`allow-write-file`|Enables the write_file command without any pre-configured scope.| +|`deny-write-file`|Denies the write_file command without any pre-configured scope.| +|`allow-write-text-file`|Enables the write_text_file command without any pre-configured scope.| +|`deny-write-text-file`|Denies the write_text_file command without any pre-configured scope.| +|`default`|# Tauri `fs` default permissions This configuration file defines the default permissions granted to the filesystem. @@ -1116,49 +295,18 @@ This default permission set prevents access to critical components of the Tauri application by default. On Windows the webview data folder access is denied. - - -## deny-default - -This denies access to dangerous Tauri relevant files and folders by default. - -## deny-webview-data-linux - -This denies read access to the +| +|`deny-default`|This denies access to dangerous Tauri relevant files and folders by default.| +|`deny-webview-data-linux`|This denies read access to the `$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here. -Allowing access can lead to sensitive information disclosure and should be well considered. - -## deny-webview-data-windows - -This denies read access to the +Allowing access can lead to sensitive information disclosure and should be well considered.| +|`deny-webview-data-windows`|This denies read access to the `$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here. -Allowing access can lead to sensitive information disclosure and should be well considered. - -## read-all - -This enables all read related commands without any pre-configured accessible paths. - -## read-dirs - -This enables directory read and file metadata related commands without any pre-configured accessible paths. - -## read-files - -This enables file read related commands without any pre-configured accessible paths. - -## read-meta - -This enables all index or metadata related commands without any pre-configured accessible paths. - -## scope - -An empty permission you can use to modify the global scope. - -## write-all - -This enables all write related commands without any pre-configured accessible paths. - -## write-files - -This enables all file write related commands without any pre-configured accessible paths. - +Allowing access can lead to sensitive information disclosure and should be well considered.| +|`read-all`|This enables all read related commands without any pre-configured accessible paths.| +|`read-dirs`|This enables directory read and file metadata related commands without any pre-configured accessible paths.| +|`read-files`|This enables file read related commands without any pre-configured accessible paths.| +|`read-meta`|This enables all index or metadata related commands without any pre-configured accessible paths.| +|`scope`|An empty permission you can use to modify the global scope.| +|`write-all`|This enables all write related commands without any pre-configured accessible paths.| +|`write-files`|This enables all file write related commands without any pre-configured accessible paths.| diff --git a/plugins/fs/permissions/schemas/schema.json b/plugins/fs/permissions/schemas/schema.json index 3f7361ab..fadb22ae 100644 --- a/plugins/fs/permissions/schemas/schema.json +++ b/plugins/fs/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/global-shortcut/permissions/autogenerated/reference.md b/plugins/global-shortcut/permissions/autogenerated/reference.md index daff8aba..071594c3 100644 --- a/plugins/global-shortcut/permissions/autogenerated/reference.md +++ b/plugins/global-shortcut/permissions/autogenerated/reference.md @@ -1,42 +1,12 @@ -# Permissions - -## allow-is-registered - -Enables the is_registered command without any pre-configured scope. - -## deny-is-registered - -Denies the is_registered command without any pre-configured scope. - -## allow-register - -Enables the register command without any pre-configured scope. - -## deny-register - -Denies the register command without any pre-configured scope. - -## allow-register-all - -Enables the register_all command without any pre-configured scope. - -## deny-register-all - -Denies the register_all command without any pre-configured scope. - -## allow-unregister - -Enables the unregister command without any pre-configured scope. - -## deny-unregister - -Denies the unregister command without any pre-configured scope. - -## allow-unregister-all - -Enables the unregister_all command without any pre-configured scope. - -## deny-unregister-all - -Denies the unregister_all command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-is-registered`|Enables the is_registered command without any pre-configured scope.| +|`deny-is-registered`|Denies the is_registered command without any pre-configured scope.| +|`allow-register`|Enables the register command without any pre-configured scope.| +|`deny-register`|Denies the register command without any pre-configured scope.| +|`allow-register-all`|Enables the register_all command without any pre-configured scope.| +|`deny-register-all`|Denies the register_all command without any pre-configured scope.| +|`allow-unregister`|Enables the unregister command without any pre-configured scope.| +|`deny-unregister`|Denies the unregister command without any pre-configured scope.| +|`allow-unregister-all`|Enables the unregister_all command without any pre-configured scope.| +|`deny-unregister-all`|Denies the unregister_all command without any pre-configured scope.| diff --git a/plugins/global-shortcut/permissions/schemas/schema.json b/plugins/global-shortcut/permissions/schemas/schema.json index 7b601b8a..1dadf863 100644 --- a/plugins/global-shortcut/permissions/schemas/schema.json +++ b/plugins/global-shortcut/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/http/permissions/autogenerated/reference.md b/plugins/http/permissions/autogenerated/reference.md index 16508acb..d0fa4a6e 100644 --- a/plugins/http/permissions/autogenerated/reference.md +++ b/plugins/http/permissions/autogenerated/reference.md @@ -1,38 +1,11 @@ -# Permissions - -## allow-fetch - -Enables the fetch command without any pre-configured scope. - -## deny-fetch - -Denies the fetch command without any pre-configured scope. - -## allow-fetch-cancel - -Enables the fetch_cancel command without any pre-configured scope. - -## deny-fetch-cancel - -Denies the fetch_cancel command without any pre-configured scope. - -## allow-fetch-read-body - -Enables the fetch_read_body command without any pre-configured scope. - -## deny-fetch-read-body - -Denies the fetch_read_body command without any pre-configured scope. - -## allow-fetch-send - -Enables the fetch_send command without any pre-configured scope. - -## deny-fetch-send - -Denies the fetch_send command without any pre-configured scope. - -## default - -Allows all fetch operations - +| Permission | Description | +|------|-----| +|`allow-fetch`|Enables the fetch command without any pre-configured scope.| +|`deny-fetch`|Denies the fetch command without any pre-configured scope.| +|`allow-fetch-cancel`|Enables the fetch_cancel command without any pre-configured scope.| +|`deny-fetch-cancel`|Denies the fetch_cancel command without any pre-configured scope.| +|`allow-fetch-read-body`|Enables the fetch_read_body command without any pre-configured scope.| +|`deny-fetch-read-body`|Denies the fetch_read_body command without any pre-configured scope.| +|`allow-fetch-send`|Enables the fetch_send command without any pre-configured scope.| +|`deny-fetch-send`|Denies the fetch_send command without any pre-configured scope.| +|`default`|Allows all fetch operations| diff --git a/plugins/http/permissions/schemas/schema.json b/plugins/http/permissions/schemas/schema.json index 559f707b..3462ddcd 100644 --- a/plugins/http/permissions/schemas/schema.json +++ b/plugins/http/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/localhost/src/lib.rs b/plugins/localhost/src/lib.rs index c0b42a29..f5f99fe4 100644 --- a/plugins/localhost/src/lib.rs +++ b/plugins/localhost/src/lib.rs @@ -102,16 +102,6 @@ impl Builder { on_request(&request, &mut response); } - #[cfg(target_os = "linux")] - if let Some(response_csp) = - response.headers.get("Content-Security-Policy") - { - let html = String::from_utf8_lossy(&asset.bytes); - let body = - html.replacen(tauri::utils::html::CSP_TOKEN, response_csp, 1); - asset.bytes = body.as_bytes().to_vec(); - } - let mut resp = HttpResponse::from_data(asset.bytes); for (header, value) in response.headers { if let Ok(h) = Header::from_bytes(header.as_bytes(), value) { diff --git a/plugins/log/permissions/autogenerated/reference.md b/plugins/log/permissions/autogenerated/reference.md index 7dd146d0..075f183e 100644 --- a/plugins/log/permissions/autogenerated/reference.md +++ b/plugins/log/permissions/autogenerated/reference.md @@ -1,14 +1,5 @@ -# Permissions - -## allow-log - -Enables the log command without any pre-configured scope. - -## deny-log - -Denies the log command without any pre-configured scope. - -## default - -Allows the log command - +| Permission | Description | +|------|-----| +|`allow-log`|Enables the log command without any pre-configured scope.| +|`deny-log`|Denies the log command without any pre-configured scope.| +|`default`|Allows the log command| diff --git a/plugins/log/permissions/schemas/schema.json b/plugins/log/permissions/schemas/schema.json index 3bb82dc4..9001f8de 100644 --- a/plugins/log/permissions/schemas/schema.json +++ b/plugins/log/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/nfc/permissions/autogenerated/reference.md b/plugins/nfc/permissions/autogenerated/reference.md index 9b972b2b..3224859f 100644 --- a/plugins/nfc/permissions/autogenerated/reference.md +++ b/plugins/nfc/permissions/autogenerated/reference.md @@ -1,26 +1,8 @@ -# Permissions - -## allow-is-available - -Enables the is_available command without any pre-configured scope. - -## deny-is-available - -Denies the is_available command without any pre-configured scope. - -## allow-scan - -Enables the scan command without any pre-configured scope. - -## deny-scan - -Denies the scan command without any pre-configured scope. - -## allow-write - -Enables the write command without any pre-configured scope. - -## deny-write - -Denies the write command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-is-available`|Enables the is_available command without any pre-configured scope.| +|`deny-is-available`|Denies the is_available command without any pre-configured scope.| +|`allow-scan`|Enables the scan command without any pre-configured scope.| +|`deny-scan`|Denies the scan command without any pre-configured scope.| +|`allow-write`|Enables the write command without any pre-configured scope.| +|`deny-write`|Denies the write command without any pre-configured scope.| diff --git a/plugins/nfc/permissions/schemas/schema.json b/plugins/nfc/permissions/schemas/schema.json index 2fbc4329..802bc48c 100644 --- a/plugins/nfc/permissions/schemas/schema.json +++ b/plugins/nfc/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/notification/permissions/autogenerated/reference.md b/plugins/notification/permissions/autogenerated/reference.md index 44cbd31b..3c461ca9 100644 --- a/plugins/notification/permissions/autogenerated/reference.md +++ b/plugins/notification/permissions/autogenerated/reference.md @@ -1,30 +1,9 @@ -# Permissions - -## allow-is-permission-granted - -Enables the is_permission_granted command without any pre-configured scope. - -## deny-is-permission-granted - -Denies the is_permission_granted command without any pre-configured scope. - -## allow-notify - -Enables the notify command without any pre-configured scope. - -## deny-notify - -Denies the notify command without any pre-configured scope. - -## allow-request-permission - -Enables the request_permission command without any pre-configured scope. - -## deny-request-permission - -Denies the request_permission command without any pre-configured scope. - -## default - -Allows requesting permission, checking permission state and sending notifications - +| Permission | Description | +|------|-----| +|`allow-is-permission-granted`|Enables the is_permission_granted command without any pre-configured scope.| +|`deny-is-permission-granted`|Denies the is_permission_granted command without any pre-configured scope.| +|`allow-notify`|Enables the notify command without any pre-configured scope.| +|`deny-notify`|Denies the notify command without any pre-configured scope.| +|`allow-request-permission`|Enables the request_permission command without any pre-configured scope.| +|`deny-request-permission`|Denies the request_permission command without any pre-configured scope.| +|`default`|Allows requesting permission, checking permission state and sending notifications| diff --git a/plugins/notification/permissions/schemas/schema.json b/plugins/notification/permissions/schemas/schema.json index a027f1ff..c3101b5c 100644 --- a/plugins/notification/permissions/schemas/schema.json +++ b/plugins/notification/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/os/permissions/autogenerated/reference.md b/plugins/os/permissions/autogenerated/reference.md index f8d334fb..563c8d28 100644 --- a/plugins/os/permissions/autogenerated/reference.md +++ b/plugins/os/permissions/autogenerated/reference.md @@ -1,66 +1,18 @@ -# Permissions - -## allow-arch - -Enables the arch command without any pre-configured scope. - -## deny-arch - -Denies the arch command without any pre-configured scope. - -## allow-exe-extension - -Enables the exe_extension command without any pre-configured scope. - -## deny-exe-extension - -Denies the exe_extension command without any pre-configured scope. - -## allow-family - -Enables the family command without any pre-configured scope. - -## deny-family - -Denies the family command without any pre-configured scope. - -## allow-hostname - -Enables the hostname command without any pre-configured scope. - -## deny-hostname - -Denies the hostname command without any pre-configured scope. - -## allow-locale - -Enables the locale command without any pre-configured scope. - -## deny-locale - -Denies the locale command without any pre-configured scope. - -## allow-os-type - -Enables the os_type command without any pre-configured scope. - -## deny-os-type - -Denies the os_type command without any pre-configured scope. - -## allow-platform - -Enables the platform command without any pre-configured scope. - -## deny-platform - -Denies the platform command without any pre-configured scope. - -## allow-version - -Enables the version command without any pre-configured scope. - -## deny-version - -Denies the version command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-arch`|Enables the arch command without any pre-configured scope.| +|`deny-arch`|Denies the arch command without any pre-configured scope.| +|`allow-exe-extension`|Enables the exe_extension command without any pre-configured scope.| +|`deny-exe-extension`|Denies the exe_extension command without any pre-configured scope.| +|`allow-family`|Enables the family command without any pre-configured scope.| +|`deny-family`|Denies the family command without any pre-configured scope.| +|`allow-hostname`|Enables the hostname command without any pre-configured scope.| +|`deny-hostname`|Denies the hostname command without any pre-configured scope.| +|`allow-locale`|Enables the locale command without any pre-configured scope.| +|`deny-locale`|Denies the locale command without any pre-configured scope.| +|`allow-os-type`|Enables the os_type command without any pre-configured scope.| +|`deny-os-type`|Denies the os_type command without any pre-configured scope.| +|`allow-platform`|Enables the platform command without any pre-configured scope.| +|`deny-platform`|Denies the platform command without any pre-configured scope.| +|`allow-version`|Enables the version command without any pre-configured scope.| +|`deny-version`|Denies the version command without any pre-configured scope.| diff --git a/plugins/os/permissions/schemas/schema.json b/plugins/os/permissions/schemas/schema.json index 95211ceb..053f783d 100644 --- a/plugins/os/permissions/schemas/schema.json +++ b/plugins/os/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/positioner/permissions/autogenerated/reference.md b/plugins/positioner/permissions/autogenerated/reference.md index 60d18ba5..b373d4fa 100644 --- a/plugins/positioner/permissions/autogenerated/reference.md +++ b/plugins/positioner/permissions/autogenerated/reference.md @@ -1,14 +1,5 @@ -# Permissions - -## allow-move-window - -Enables the move_window command without any pre-configured scope. - -## deny-move-window - -Denies the move_window command without any pre-configured scope. - -## default - -Allows the move_window command - +| Permission | Description | +|------|-----| +|`allow-move-window`|Enables the move_window command without any pre-configured scope.| +|`deny-move-window`|Denies the move_window command without any pre-configured scope.| +|`default`|Allows the move_window command| diff --git a/plugins/positioner/permissions/schemas/schema.json b/plugins/positioner/permissions/schemas/schema.json index b5c0d3ae..d887b33f 100644 --- a/plugins/positioner/permissions/schemas/schema.json +++ b/plugins/positioner/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/process/permissions/autogenerated/reference.md b/plugins/process/permissions/autogenerated/reference.md index a5822a92..1bef22c9 100644 --- a/plugins/process/permissions/autogenerated/reference.md +++ b/plugins/process/permissions/autogenerated/reference.md @@ -1,18 +1,6 @@ -# Permissions - -## allow-exit - -Enables the exit command without any pre-configured scope. - -## deny-exit - -Denies the exit command without any pre-configured scope. - -## allow-restart - -Enables the restart command without any pre-configured scope. - -## deny-restart - -Denies the restart command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-exit`|Enables the exit command without any pre-configured scope.| +|`deny-exit`|Denies the exit command without any pre-configured scope.| +|`allow-restart`|Enables the restart command without any pre-configured scope.| +|`deny-restart`|Denies the restart command without any pre-configured scope.| diff --git a/plugins/process/permissions/schemas/schema.json b/plugins/process/permissions/schemas/schema.json index 37d49a04..a8fbdcc6 100644 --- a/plugins/process/permissions/schemas/schema.json +++ b/plugins/process/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/shell/permissions/autogenerated/reference.md b/plugins/shell/permissions/autogenerated/reference.md index 93f94f3d..27a2ace7 100644 --- a/plugins/shell/permissions/autogenerated/reference.md +++ b/plugins/shell/permissions/autogenerated/reference.md @@ -1,34 +1,10 @@ -# Permissions - -## allow-execute - -Enables the execute command without any pre-configured scope. - -## deny-execute - -Denies the execute command without any pre-configured scope. - -## allow-kill - -Enables the kill command without any pre-configured scope. - -## deny-kill - -Denies the kill command without any pre-configured scope. - -## allow-open - -Enables the open command without any pre-configured scope. - -## deny-open - -Denies the open command without any pre-configured scope. - -## allow-stdin-write - -Enables the stdin_write command without any pre-configured scope. - -## deny-stdin-write - -Denies the stdin_write command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-execute`|Enables the execute command without any pre-configured scope.| +|`deny-execute`|Denies the execute command without any pre-configured scope.| +|`allow-kill`|Enables the kill command without any pre-configured scope.| +|`deny-kill`|Denies the kill command without any pre-configured scope.| +|`allow-open`|Enables the open command without any pre-configured scope.| +|`deny-open`|Denies the open command without any pre-configured scope.| +|`allow-stdin-write`|Enables the stdin_write command without any pre-configured scope.| +|`deny-stdin-write`|Denies the stdin_write command without any pre-configured scope.| diff --git a/plugins/shell/permissions/schemas/schema.json b/plugins/shell/permissions/schemas/schema.json index ff5a12e1..1e1cd012 100644 --- a/plugins/shell/permissions/schemas/schema.json +++ b/plugins/shell/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/sql/permissions/autogenerated/reference.md b/plugins/sql/permissions/autogenerated/reference.md index a9734e01..a3e12134 100644 --- a/plugins/sql/permissions/autogenerated/reference.md +++ b/plugins/sql/permissions/autogenerated/reference.md @@ -1,34 +1,10 @@ -# Permissions - -## allow-close - -Enables the close command without any pre-configured scope. - -## deny-close - -Denies the close command without any pre-configured scope. - -## allow-execute - -Enables the execute command without any pre-configured scope. - -## deny-execute - -Denies the execute command without any pre-configured scope. - -## allow-load - -Enables the load command without any pre-configured scope. - -## deny-load - -Denies the load command without any pre-configured scope. - -## allow-select - -Enables the select command without any pre-configured scope. - -## deny-select - -Denies the select command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-close`|Enables the close command without any pre-configured scope.| +|`deny-close`|Denies the close command without any pre-configured scope.| +|`allow-execute`|Enables the execute command without any pre-configured scope.| +|`deny-execute`|Denies the execute command without any pre-configured scope.| +|`allow-load`|Enables the load command without any pre-configured scope.| +|`deny-load`|Denies the load command without any pre-configured scope.| +|`allow-select`|Enables the select command without any pre-configured scope.| +|`deny-select`|Denies the select command without any pre-configured scope.| diff --git a/plugins/sql/permissions/schemas/schema.json b/plugins/sql/permissions/schemas/schema.json index 72346618..62db780d 100644 --- a/plugins/sql/permissions/schemas/schema.json +++ b/plugins/sql/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/store/permissions/autogenerated/reference.md b/plugins/store/permissions/autogenerated/reference.md index fd626ff7..ea9c07f0 100644 --- a/plugins/store/permissions/autogenerated/reference.md +++ b/plugins/store/permissions/autogenerated/reference.md @@ -1,98 +1,26 @@ -# Permissions - -## allow-clear - -Enables the clear command without any pre-configured scope. - -## deny-clear - -Denies the clear command without any pre-configured scope. - -## allow-delete - -Enables the delete command without any pre-configured scope. - -## deny-delete - -Denies the delete command without any pre-configured scope. - -## allow-entries - -Enables the entries command without any pre-configured scope. - -## deny-entries - -Denies the entries command without any pre-configured scope. - -## allow-get - -Enables the get command without any pre-configured scope. - -## deny-get - -Denies the get command without any pre-configured scope. - -## allow-has - -Enables the has command without any pre-configured scope. - -## deny-has - -Denies the has command without any pre-configured scope. - -## allow-keys - -Enables the keys command without any pre-configured scope. - -## deny-keys - -Denies the keys command without any pre-configured scope. - -## allow-length - -Enables the length command without any pre-configured scope. - -## deny-length - -Denies the length command without any pre-configured scope. - -## allow-load - -Enables the load command without any pre-configured scope. - -## deny-load - -Denies the load command without any pre-configured scope. - -## allow-reset - -Enables the reset command without any pre-configured scope. - -## deny-reset - -Denies the reset command without any pre-configured scope. - -## allow-save - -Enables the save command without any pre-configured scope. - -## deny-save - -Denies the save command without any pre-configured scope. - -## allow-set - -Enables the set command without any pre-configured scope. - -## deny-set - -Denies the set command without any pre-configured scope. - -## allow-values - -Enables the values command without any pre-configured scope. - -## deny-values - -Denies the values command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-clear`|Enables the clear command without any pre-configured scope.| +|`deny-clear`|Denies the clear command without any pre-configured scope.| +|`allow-delete`|Enables the delete command without any pre-configured scope.| +|`deny-delete`|Denies the delete command without any pre-configured scope.| +|`allow-entries`|Enables the entries command without any pre-configured scope.| +|`deny-entries`|Denies the entries command without any pre-configured scope.| +|`allow-get`|Enables the get command without any pre-configured scope.| +|`deny-get`|Denies the get command without any pre-configured scope.| +|`allow-has`|Enables the has command without any pre-configured scope.| +|`deny-has`|Denies the has command without any pre-configured scope.| +|`allow-keys`|Enables the keys command without any pre-configured scope.| +|`deny-keys`|Denies the keys command without any pre-configured scope.| +|`allow-length`|Enables the length command without any pre-configured scope.| +|`deny-length`|Denies the length command without any pre-configured scope.| +|`allow-load`|Enables the load command without any pre-configured scope.| +|`deny-load`|Denies the load command without any pre-configured scope.| +|`allow-reset`|Enables the reset command without any pre-configured scope.| +|`deny-reset`|Denies the reset command without any pre-configured scope.| +|`allow-save`|Enables the save command without any pre-configured scope.| +|`deny-save`|Denies the save command without any pre-configured scope.| +|`allow-set`|Enables the set command without any pre-configured scope.| +|`deny-set`|Denies the set command without any pre-configured scope.| +|`allow-values`|Enables the values command without any pre-configured scope.| +|`deny-values`|Denies the values command without any pre-configured scope.| diff --git a/plugins/store/permissions/schemas/schema.json b/plugins/store/permissions/schemas/schema.json index dd004c0b..de5b1580 100644 --- a/plugins/store/permissions/schemas/schema.json +++ b/plugins/store/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/stronghold/permissions/autogenerated/reference.md b/plugins/stronghold/permissions/autogenerated/reference.md index 799ae7db..da3494eb 100644 --- a/plugins/stronghold/permissions/autogenerated/reference.md +++ b/plugins/stronghold/permissions/autogenerated/reference.md @@ -1,90 +1,24 @@ -# Permissions - -## allow-create-client - -Enables the create_client command without any pre-configured scope. - -## deny-create-client - -Denies the create_client command without any pre-configured scope. - -## allow-destroy - -Enables the destroy command without any pre-configured scope. - -## deny-destroy - -Denies the destroy command without any pre-configured scope. - -## allow-execute-procedure - -Enables the execute_procedure command without any pre-configured scope. - -## deny-execute-procedure - -Denies the execute_procedure command without any pre-configured scope. - -## allow-get-store-record - -Enables the get_store_record command without any pre-configured scope. - -## deny-get-store-record - -Denies the get_store_record command without any pre-configured scope. - -## allow-initialize - -Enables the initialize command without any pre-configured scope. - -## deny-initialize - -Denies the initialize command without any pre-configured scope. - -## allow-load-client - -Enables the load_client command without any pre-configured scope. - -## deny-load-client - -Denies the load_client command without any pre-configured scope. - -## allow-remove-secret - -Enables the remove_secret command without any pre-configured scope. - -## deny-remove-secret - -Denies the remove_secret command without any pre-configured scope. - -## allow-remove-store-record - -Enables the remove_store_record command without any pre-configured scope. - -## deny-remove-store-record - -Denies the remove_store_record command without any pre-configured scope. - -## allow-save - -Enables the save command without any pre-configured scope. - -## deny-save - -Denies the save command without any pre-configured scope. - -## allow-save-secret - -Enables the save_secret command without any pre-configured scope. - -## deny-save-secret - -Denies the save_secret command without any pre-configured scope. - -## allow-save-store-record - -Enables the save_store_record command without any pre-configured scope. - -## deny-save-store-record - -Denies the save_store_record command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-create-client`|Enables the create_client command without any pre-configured scope.| +|`deny-create-client`|Denies the create_client command without any pre-configured scope.| +|`allow-destroy`|Enables the destroy command without any pre-configured scope.| +|`deny-destroy`|Denies the destroy command without any pre-configured scope.| +|`allow-execute-procedure`|Enables the execute_procedure command without any pre-configured scope.| +|`deny-execute-procedure`|Denies the execute_procedure command without any pre-configured scope.| +|`allow-get-store-record`|Enables the get_store_record command without any pre-configured scope.| +|`deny-get-store-record`|Denies the get_store_record command without any pre-configured scope.| +|`allow-initialize`|Enables the initialize command without any pre-configured scope.| +|`deny-initialize`|Denies the initialize command without any pre-configured scope.| +|`allow-load-client`|Enables the load_client command without any pre-configured scope.| +|`deny-load-client`|Denies the load_client command without any pre-configured scope.| +|`allow-remove-secret`|Enables the remove_secret command without any pre-configured scope.| +|`deny-remove-secret`|Denies the remove_secret command without any pre-configured scope.| +|`allow-remove-store-record`|Enables the remove_store_record command without any pre-configured scope.| +|`deny-remove-store-record`|Denies the remove_store_record command without any pre-configured scope.| +|`allow-save`|Enables the save command without any pre-configured scope.| +|`deny-save`|Denies the save command without any pre-configured scope.| +|`allow-save-secret`|Enables the save_secret command without any pre-configured scope.| +|`deny-save-secret`|Denies the save_secret command without any pre-configured scope.| +|`allow-save-store-record`|Enables the save_store_record command without any pre-configured scope.| +|`deny-save-store-record`|Denies the save_store_record command without any pre-configured scope.| diff --git a/plugins/stronghold/permissions/schemas/schema.json b/plugins/stronghold/permissions/schemas/schema.json index 9535be4f..54d7da98 100644 --- a/plugins/stronghold/permissions/schemas/schema.json +++ b/plugins/stronghold/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/updater/permissions/autogenerated/reference.md b/plugins/updater/permissions/autogenerated/reference.md index 033690d4..2dacf032 100644 --- a/plugins/updater/permissions/autogenerated/reference.md +++ b/plugins/updater/permissions/autogenerated/reference.md @@ -1,22 +1,7 @@ -# Permissions - -## allow-check - -Enables the check command without any pre-configured scope. - -## deny-check - -Denies the check command without any pre-configured scope. - -## allow-download-and-install - -Enables the download_and_install command without any pre-configured scope. - -## deny-download-and-install - -Denies the download_and_install command without any pre-configured scope. - -## default - -Allows checking for new updates and installing them - +| Permission | Description | +|------|-----| +|`allow-check`|Enables the check command without any pre-configured scope.| +|`deny-check`|Denies the check command without any pre-configured scope.| +|`allow-download-and-install`|Enables the download_and_install command without any pre-configured scope.| +|`deny-download-and-install`|Denies the download_and_install command without any pre-configured scope.| +|`default`|Allows checking for new updates and installing them| diff --git a/plugins/updater/permissions/schemas/schema.json b/plugins/updater/permissions/schemas/schema.json index e170fd1b..6d6a3c21 100644 --- a/plugins/updater/permissions/schemas/schema.json +++ b/plugins/updater/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/upload/permissions/autogenerated/reference.md b/plugins/upload/permissions/autogenerated/reference.md index 2e8a4853..2b4cb1b6 100644 --- a/plugins/upload/permissions/autogenerated/reference.md +++ b/plugins/upload/permissions/autogenerated/reference.md @@ -1,18 +1,6 @@ -# Permissions - -## allow-download - -Enables the download command without any pre-configured scope. - -## deny-download - -Denies the download command without any pre-configured scope. - -## allow-upload - -Enables the upload command without any pre-configured scope. - -## deny-upload - -Denies the upload command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-download`|Enables the download command without any pre-configured scope.| +|`deny-download`|Denies the download command without any pre-configured scope.| +|`allow-upload`|Enables the upload command without any pre-configured scope.| +|`deny-upload`|Denies the upload command without any pre-configured scope.| diff --git a/plugins/upload/permissions/schemas/schema.json b/plugins/upload/permissions/schemas/schema.json index bb0afc88..d7eeb35f 100644 --- a/plugins/upload/permissions/schemas/schema.json +++ b/plugins/upload/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/websocket/permissions/autogenerated/reference.md b/plugins/websocket/permissions/autogenerated/reference.md index 9f66b798..fe0b0727 100644 --- a/plugins/websocket/permissions/autogenerated/reference.md +++ b/plugins/websocket/permissions/autogenerated/reference.md @@ -1,22 +1,7 @@ -# Permissions - -## allow-connect - -Enables the connect command without any pre-configured scope. - -## deny-connect - -Denies the connect command without any pre-configured scope. - -## allow-send - -Enables the send command without any pre-configured scope. - -## deny-send - -Denies the send command without any pre-configured scope. - -## default - -Allows connecting and sending data to a WebSocket server - +| Permission | Description | +|------|-----| +|`allow-connect`|Enables the connect command without any pre-configured scope.| +|`deny-connect`|Denies the connect command without any pre-configured scope.| +|`allow-send`|Enables the send command without any pre-configured scope.| +|`deny-send`|Denies the send command without any pre-configured scope.| +|`default`|Allows connecting and sending data to a WebSocket server| diff --git a/plugins/websocket/permissions/schemas/schema.json b/plugins/websocket/permissions/schemas/schema.json index 9557d918..4a773ccb 100644 --- a/plugins/websocket/permissions/schemas/schema.json +++ b/plugins/websocket/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/plugins/window-state/permissions/autogenerated/reference.md b/plugins/window-state/permissions/autogenerated/reference.md index 767eea84..fca68efd 100644 --- a/plugins/window-state/permissions/autogenerated/reference.md +++ b/plugins/window-state/permissions/autogenerated/reference.md @@ -1,18 +1,6 @@ -# Permissions - -## allow-restore-window-state - -Enables the restore_window_state command without any pre-configured scope. - -## deny-restore-window-state - -Denies the restore_window_state command without any pre-configured scope. - -## allow-save-window-state - -Enables the save_window_state command without any pre-configured scope. - -## deny-save-window-state - -Denies the save_window_state command without any pre-configured scope. - +| Permission | Description | +|------|-----| +|`allow-restore-window-state`|Enables the restore_window_state command without any pre-configured scope.| +|`deny-restore-window-state`|Denies the restore_window_state command without any pre-configured scope.| +|`allow-save-window-state`|Enables the save_window_state command without any pre-configured scope.| +|`deny-save-window-state`|Denies the save_window_state command without any pre-configured scope.| diff --git a/plugins/window-state/permissions/schemas/schema.json b/plugins/window-state/permissions/schemas/schema.json index fa5eff81..37dcf652 100644 --- a/plugins/window-state/permissions/schemas/schema.json +++ b/plugins/window-state/permissions/schemas/schema.json @@ -17,7 +17,6 @@ }, "set": { "description": "A list of permissions sets defined", - "default": [], "type": "array", "items": { "$ref": "#/definitions/PermissionSet" @@ -132,12 +131,25 @@ }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "default": {}, "allOf": [ { "$ref": "#/definitions/Scopes" } ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } } } }, @@ -243,6 +255,46 @@ } ] }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, "PermissionKind": { "type": "string", "oneOf": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6aae7334..229ac6a6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -64,8 +64,8 @@ importers: examples/api: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 + version: 2.0.0-beta.3 '@tauri-apps/plugin-barcode-scanner': specifier: 2.0.0-beta.1 version: link:../../plugins/barcode-scanner @@ -122,8 +122,8 @@ importers: specifier: ^3.0.1 version: 3.0.1(svelte@4.2.8)(vite@5.0.12) '@tauri-apps/cli': - specifier: 2.0.0-beta.3 - version: 2.0.0-beta.3 + specifier: 2.0.0-beta.6 + version: 2.0.0-beta.6 '@unocss/extractor-svelte': specifier: ^0.58.0 version: 0.58.0 @@ -135,7 +135,7 @@ importers: version: 4.2.8 unocss: specifier: ^0.58.0 - version: 0.58.0(postcss@8.4.32)(vite@5.0.12) + version: 0.58.0(postcss@8.4.32)(rollup@4.9.6)(vite@5.0.12) vite: specifier: ^5.0.12 version: 5.0.12 @@ -395,7 +395,7 @@ packages: '@babel/traverse': 7.23.5 '@babel/types': 7.23.5 convert-source-map: 2.0.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 7.5.4 @@ -665,7 +665,7 @@ packages: '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.23.5 '@babel/types': 7.23.5 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -799,7 +799,7 @@ packages: peerDependencies: mocha: ^10.0.0 dependencies: - effection: 2.0.8 + effection: 2.0.8(mocha@10.2.0) mocha: 10.2.0 dev: true @@ -1046,7 +1046,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) espree: 9.6.1 globals: 13.23.0 ignore: 5.3.0 @@ -1068,7 +1068,7 @@ packages: engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 2.0.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -1109,7 +1109,7 @@ packages: '@antfu/install-pkg': 0.1.1 '@antfu/utils': 0.7.6 '@iconify/types': 2.0.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) kolorist: 1.8.0 local-pkg: 0.4.3 transitivePeerDependencies: @@ -1225,20 +1225,6 @@ packages: typescript: 5.3.3 dev: true - /@rollup/pluginutils@5.1.0: - resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@types/estree': 1.0.5 - estree-walker: 2.0.2 - picomatch: 2.3.1 - dev: true - /@rollup/pluginutils@5.1.0(rollup@4.9.6): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} @@ -1463,7 +1449,7 @@ packages: vite: ^5.0.0 dependencies: '@sveltejs/vite-plugin-svelte': 3.0.1(svelte@4.2.8)(vite@5.0.12) - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) svelte: 4.2.8 vite: 5.0.12 transitivePeerDependencies: @@ -1478,7 +1464,7 @@ packages: vite: ^5.0.0 dependencies: '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.12) - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.5 @@ -1495,6 +1481,11 @@ packages: engines: {node: '>= 18', npm: '>= 6.6.0', yarn: '>= 1.19.1'} dev: false + /@tauri-apps/api@2.0.0-beta.3: + resolution: {integrity: sha512-gDSJzKpBs6efXw2ZWqjl9QVNImY5GR5qygXqB7JK4y7prcQInxnTj2ARFR0vD4wuzkrUHGrlIKraiJJPHWJ9vg==} + engines: {node: '>= 18', npm: '>= 6.6.0', yarn: '>= 1.19.1'} + dev: false + /@tauri-apps/cli-darwin-arm64@2.0.0-beta.3: resolution: {integrity: sha512-gHcn3jI/4MDXDIlK/4Zz0ftTosgN3OimWlKxEz777QrA1hldrQweYIhdZXkqE9KgoE+u6w80vWIcr0InHAf7Iw==} engines: {node: '>= 10'} @@ -1504,6 +1495,15 @@ packages: dev: true optional: true + /@tauri-apps/cli-darwin-arm64@2.0.0-beta.6: + resolution: {integrity: sha512-G1KJhWB8SgITE2iwWmOoyMhykljz7sGxQL5BnNLHLeyNvc6DwkgQ0AObkmFTz2JLnstWQ/kKyg/uoQNMNA/wyQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@tauri-apps/cli-darwin-x64@2.0.0-beta.3: resolution: {integrity: sha512-kRCaukT2IAGMmNuAOUBhdZRlKujTy2lSsdNKmgGEMnzQLKJwWO9Gpq1NmPY7ZVqyXK/X8QnGHuasDEQsSO6B4w==} engines: {node: '>= 10'} @@ -1513,6 +1513,15 @@ packages: dev: true optional: true + /@tauri-apps/cli-darwin-x64@2.0.0-beta.6: + resolution: {integrity: sha512-Dju4V53dO7KVvmMqXZeNp2tfMOEVDCORf40ZnP9zrE58mvqoEHbri4F+m+UN+fSdEOzic12nSGXDO/nilqs+aA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.3: resolution: {integrity: sha512-cpNZOQDotNSdjoZT16s1JtZvnkM0wgLwU39AhKhRCco4KEH3/8G1ngKF9JKalWUN8zDTcuCigEAr37gEv4mLAA==} engines: {node: '>= 10'} @@ -1522,6 +1531,15 @@ packages: dev: true optional: true + /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.6: + resolution: {integrity: sha512-w4dmL9VZD2UaDYRE6XRmIPxg2XJDT5Zn+76NGVFiZjsZniEh2c0KP0Ytd0nA1jn1cphgn0RDJkRqtPvT5nGQoA==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.3: resolution: {integrity: sha512-8q86V6P9bkeoFcnvSsnvOwmKY6ijIN4ueRVXCj5cVpsw392VF9vud1Nq7/l+QDgn9OWbZNNVDl30iyoSuaykBA==} engines: {node: '>= 10'} @@ -1531,6 +1549,15 @@ packages: dev: true optional: true + /@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.6: + resolution: {integrity: sha512-0oVOSUg1wtoy+qOLjF3uQRxgtUFoqrRpb6cSebTfe4NaHHfF6qKGtZdK/Po0+jQ6RItz3iUV2bgy7Evx3lVFMw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.3: resolution: {integrity: sha512-L7fokh4aqyV6yDPoeKwFN3Yt0pCAuZMWeP5tOeSBiom1pU7ppKH+4KHeTekNEIecZG+Ah250DkVCdmWS+aRFTA==} engines: {node: '>= 10'} @@ -1540,6 +1567,15 @@ packages: dev: true optional: true + /@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.6: + resolution: {integrity: sha512-l0sH61OysOK17lL9Je/AS+Bs1a2zafg2te/G7WVi4Z1uFuSirMjPzCFJBT4/vY53AeyuRNja+XhszLdf0ud0BQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.3: resolution: {integrity: sha512-/crp3K6PathqicVWPj8Kh1120NNVV7nagJ7oZW9OFch7nBS1tmDnSB5k5LgA4yYu+lDKNUREnATMWHL6i0gNeg==} engines: {node: '>= 10'} @@ -1549,6 +1585,15 @@ packages: dev: true optional: true + /@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.6: + resolution: {integrity: sha512-RkDhQQv34Qr5xrjoaRclTpHFf/YQdH6ftSTaUKhEdaVDEJPUbVZUxj70f58b1bV6kuokvT3r5whb9I4lfCBZZw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@tauri-apps/cli-linux-x64-musl@2.0.0-beta.3: resolution: {integrity: sha512-jX1ZT0UQwdBGbpCwlpv2bsLDO7KFMeDJQ/ZZVMfWyjuYrGBG5zhJ2NXwTMkHVnxfvE6BVmnybWcykeSqTATeOw==} engines: {node: '>= 10'} @@ -1558,6 +1603,15 @@ packages: dev: true optional: true + /@tauri-apps/cli-linux-x64-musl@2.0.0-beta.6: + resolution: {integrity: sha512-d2s7uTjejf44VmGEmbSeERB1cbIkx3o7lyzPBnwLcluxi21xEVIa8SLKDR8iLZdovdWkJEre+nz/ViaBQw8nHA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.3: resolution: {integrity: sha512-UCEZNKocENLX3HYKid4FEbrCMjCX9e58klBIvJKxT8HTjvpgFYDoKccswDNfszLhmineKMlkUvm7j7U0sMh8MQ==} engines: {node: '>= 10'} @@ -1567,6 +1621,15 @@ packages: dev: true optional: true + /@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.6: + resolution: {integrity: sha512-KZ+ByWOr46YR7j2C/EsJObjmUnMw3y9rzm3UU0DLE84ty8x7/TSVrIoV6W7DsgduLf7kKyy9dQTyFUNK+A5d7Q==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.3: resolution: {integrity: sha512-O8syGXDHyKN/cv1ktD76dTcbkQ1nNEPhnT1Z+r0GKxNsw4/MyIVglzEcou3aPq0/1MQ0PEGVyG1x0JMaPw7oHQ==} engines: {node: '>= 10'} @@ -1576,6 +1639,15 @@ packages: dev: true optional: true + /@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.6: + resolution: {integrity: sha512-CPCAxMZ8XtWsZ875/YQAnFCrkeFnGqw5on2D4PHmkZRhrOyoFCa0R65Q0cWCHzX6M/fmo40QkSJiASR87RCRJg==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.3: resolution: {integrity: sha512-YDdF3XWaptjKtKz33sZhC+uNAZwp6QtAmZSRCQQlC1W7uJwLD00/3QF4vO/c6Qm+BGFsazVh1+YmBF1p0kV0rg==} engines: {node: '>= 10'} @@ -1585,6 +1657,15 @@ packages: dev: true optional: true + /@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.6: + resolution: {integrity: sha512-YcfbicO3DQcJEd5eOJ4ydwzHwaF3KlWhH+yZZbhnpzdfl+BK/PlEs6sGUoBW2h1RJ9lLlDK51RNMZGq9O0QaYg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@tauri-apps/cli@2.0.0-beta.3: resolution: {integrity: sha512-xLAL2DNNUJWqHBKvanc3V9bG9kkwtFwc40X/DrfgEKnkajEm79wqnkaT8LUnmbe0WZ8bzBRO1fLIgKlOH6GiCA==} engines: {node: '>= 10'} @@ -1602,6 +1683,23 @@ packages: '@tauri-apps/cli-win32-x64-msvc': 2.0.0-beta.3 dev: true + /@tauri-apps/cli@2.0.0-beta.6: + resolution: {integrity: sha512-4DwhpXI51NnAYkDlROMvCJ7S+M7efuaA5zqcBStodr0NaKyB4buuf8zkCSpqdMW4gXBXDHDwi1Mbm9G1L7LyDA==} + engines: {node: '>= 10'} + hasBin: true + optionalDependencies: + '@tauri-apps/cli-darwin-arm64': 2.0.0-beta.6 + '@tauri-apps/cli-darwin-x64': 2.0.0-beta.6 + '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-beta.6 + '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-beta.6 + '@tauri-apps/cli-linux-arm64-musl': 2.0.0-beta.6 + '@tauri-apps/cli-linux-x64-gnu': 2.0.0-beta.6 + '@tauri-apps/cli-linux-x64-musl': 2.0.0-beta.6 + '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-beta.6 + '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-beta.6 + '@tauri-apps/cli-win32-x64-msvc': 2.0.0-beta.6 + dev: true + /@tauri-apps/toml@2.2.4: resolution: {integrity: sha512-NJV/pdgJObDlDWi5+MTHZ2qyNvdL0dlHqQ72nzQYXWbW1LHMPXgCJYl0pLqL1XxxLtxtInYbtVCGVAcwhGxdkw==} dev: true @@ -1652,7 +1750,7 @@ packages: '@typescript-eslint/type-utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/visitor-keys': 6.20.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) eslint: 8.56.0 graphemer: 1.4.0 ignore: 5.3.0 @@ -1678,7 +1776,7 @@ packages: '@typescript-eslint/types': 6.20.0 '@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3) '@typescript-eslint/visitor-keys': 6.20.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) eslint: 8.56.0 typescript: 5.3.3 transitivePeerDependencies: @@ -1705,7 +1803,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3) '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) eslint: 8.56.0 ts-api-utils: 1.0.3(typescript@5.3.3) typescript: 5.3.3 @@ -1729,7 +1827,7 @@ packages: dependencies: '@typescript-eslint/types': 6.20.0 '@typescript-eslint/visitor-keys': 6.20.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 @@ -1771,7 +1869,7 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@unocss/astro@0.58.0(vite@5.0.12): + /@unocss/astro@0.58.0(rollup@4.9.6)(vite@5.0.12): resolution: {integrity: sha512-df+tEFO5eKXjQOwSWQhS9IdjD0sfLHLtn8U09sEKR2Nmh5CvpwyBxmvLQgOCilPou7ehmyKfsyGRLZg7IMp+Ew==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 @@ -1781,19 +1879,19 @@ packages: dependencies: '@unocss/core': 0.58.0 '@unocss/reset': 0.58.0 - '@unocss/vite': 0.58.0(vite@5.0.12) + '@unocss/vite': 0.58.0(rollup@4.9.6)(vite@5.0.12) vite: 5.0.12 transitivePeerDependencies: - rollup dev: true - /@unocss/cli@0.58.0: + /@unocss/cli@0.58.0(rollup@4.9.6): resolution: {integrity: sha512-rhsrDBxAVueygMcAbMkbuvsHbBL2rG6N96LllYwHn16FLgOE3Sf4JW1/LlNjQje3BtwMMtbSCCAeu2SryFhzbw==} engines: {node: '>=14'} hasBin: true dependencies: '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.1.0 + '@rollup/pluginutils': 5.1.0(rollup@4.9.6) '@unocss/config': 0.58.0 '@unocss/core': 0.58.0 '@unocss/preset-uno': 0.58.0 @@ -1969,13 +2067,13 @@ packages: '@unocss/core': 0.58.0 dev: true - /@unocss/vite@0.58.0(vite@5.0.12): + /@unocss/vite@0.58.0(rollup@4.9.6)(vite@5.0.12): resolution: {integrity: sha512-OCUOLMSOBEtXOEyBbAvMI3/xdR175BWRzmvV9Wc34ANZclEvCdVH8+WU725ibjY4VT0gVIuX68b13fhXdHV41A==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 dependencies: '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.1.0 + '@rollup/pluginutils': 5.1.0(rollup@4.9.6) '@unocss/config': 0.58.0 '@unocss/core': 0.58.0 '@unocss/inspector': 0.58.0 @@ -2478,18 +2576,6 @@ packages: ms: 2.1.3 dev: true - /debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: true - /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -2590,18 +2676,6 @@ packages: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} dev: true - /effection@2.0.8: - resolution: {integrity: sha512-/v7cbPIXGGylInQgHHjJutzqUn6VIfcP13hh2X0hXf04wwAlSI+lVjUBKpr5TX3+v9dXV/JLHO/pqQ9Cp1QAnQ==} - dependencies: - '@effection/channel': 2.0.6 - '@effection/core': 2.2.3 - '@effection/events': 2.0.6 - '@effection/fetch': 2.0.7(mocha@10.2.0) - '@effection/main': 2.1.2 - '@effection/stream': 2.0.6 - '@effection/subscription': 2.0.6 - dev: true - /effection@2.0.8(mocha@10.2.0): resolution: {integrity: sha512-/v7cbPIXGGylInQgHHjJutzqUn6VIfcP13hh2X0hXf04wwAlSI+lVjUBKpr5TX3+v9dXV/JLHO/pqQ9Cp1QAnQ==} dependencies: @@ -2944,7 +3018,7 @@ packages: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -3866,7 +3940,7 @@ packages: /micromark@2.11.4: resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) parse-entities: 2.0.0 transitivePeerDependencies: - supports-color @@ -4893,7 +4967,7 @@ packages: '@types/unist': 2.0.10 dev: true - /unocss@0.58.0(postcss@8.4.32)(vite@5.0.12): + /unocss@0.58.0(postcss@8.4.32)(rollup@4.9.6)(vite@5.0.12): resolution: {integrity: sha512-MSPRHxBqWN+1AHGV+J5uUy4//e6ZBK6O+ISzD0qrXcCD/GNtxk1+lYjOK2ltkUiKX539+/KF91vNxzhhwEf+xA==} engines: {node: '>=14'} peerDependencies: @@ -4905,8 +4979,8 @@ packages: vite: optional: true dependencies: - '@unocss/astro': 0.58.0(vite@5.0.12) - '@unocss/cli': 0.58.0 + '@unocss/astro': 0.58.0(rollup@4.9.6)(vite@5.0.12) + '@unocss/cli': 0.58.0(rollup@4.9.6) '@unocss/core': 0.58.0 '@unocss/extractor-arbitrary-variants': 0.58.0 '@unocss/postcss': 0.58.0(postcss@8.4.32) @@ -4924,7 +4998,7 @@ packages: '@unocss/transformer-compile-class': 0.58.0 '@unocss/transformer-directives': 0.58.0 '@unocss/transformer-variant-group': 0.58.0 - '@unocss/vite': 0.58.0(vite@5.0.12) + '@unocss/vite': 0.58.0(rollup@4.9.6)(vite@5.0.12) vite: 5.0.12 transitivePeerDependencies: - postcss From 22f5acf2407e0689f5a7d87f56cc8c8bfb939ebe Mon Sep 17 00:00:00 2001 From: Ahmed Elkhoudiry Date: Mon, 4 Mar 2024 21:02:17 +0200 Subject: [PATCH 7/9] feat(store): Add android & iOS support (#1011) * update cli * init android module * upgdate gitignore * add desktop and mobile * android * ios * lib * remove comment * cargo fmt * skip empty file creation * android comments * apple path * Discard changes to plugins/store/ios/README.md * stop auto directories creation * Update README.md --- .gitignore | 5 +- README.md | 2 +- plugins/deep-link/src/api-iife.js | 2 +- plugins/store/android/build.gradle.kts | 40 ++++ plugins/store/android/proguard-rules.pro | 21 ++ plugins/store/android/settings.gradle | 2 + .../android/src/main/AndroidManifest.xml | 3 + .../android/src/main/java/StorePlugin.kt | 50 ++++ plugins/store/build.rs | 5 +- plugins/store/ios/Package.resolved | 16 ++ plugins/store/ios/Package.swift | 33 +++ plugins/store/ios/Sources/StorePlugin.swift | 217 ++++++++++++++++++ plugins/store/src/desktop.rs | 49 ++++ plugins/store/src/error.rs | 9 + plugins/store/src/lib.rs | 68 ++++-- plugins/store/src/mobile.rs | 53 +++++ plugins/store/src/store.rs | 74 +++--- 17 files changed, 583 insertions(+), 66 deletions(-) create mode 100644 plugins/store/android/build.gradle.kts create mode 100644 plugins/store/android/proguard-rules.pro create mode 100644 plugins/store/android/settings.gradle create mode 100644 plugins/store/android/src/main/AndroidManifest.xml create mode 100644 plugins/store/android/src/main/java/StorePlugin.kt create mode 100644 plugins/store/ios/Package.resolved create mode 100644 plugins/store/ios/Package.swift create mode 100644 plugins/store/ios/Sources/StorePlugin.swift create mode 100644 plugins/store/src/desktop.rs create mode 100644 plugins/store/src/mobile.rs diff --git a/.gitignore b/.gitignore index 5ea09efa..0a7e8503 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,7 @@ target node_modules dist-js dist -**/capabilities/schemas \ No newline at end of file +.idea +.vscode +.gradle +**/capabilities/schemas diff --git a/README.md b/README.md index 444c4e99..52ffce07 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ | [shell](plugins/shell) | Access the system shell. Allows you to spawn child processes and manage files and URLs using their default application. | ✅ | ✅ | ✅ | ? | ? | | [single-instance](plugins/single-instance) | Ensure a single instance of your tauri app is running. | ✅ | ? | ✅ | ? | ? | | [sql](plugins/sql) | Interface with SQL databases. | ✅ | ✅ | ✅ | ? | ? | -| [store](plugins/store) | Persistent key value storage. | ✅ | ✅ | ✅ | ? | ? | +| [store](plugins/store) | Persistent key value storage. | ✅ | ✅ | ✅ | ✅ | ✅ | | [stronghold](plugins/stronghold) | Encrypted, secure database. | ✅ | ✅ | ✅ | ? | ? | | [updater](plugins/updater) | In-app updates for Tauri applications. | ✅ | ✅ | ✅ | ? | ? | | [upload](plugins/upload) | Tauri plugin for file uploads through HTTP. | ✅ | ✅ | ✅ | ? | ? | diff --git a/plugins/deep-link/src/api-iife.js b/plugins/deep-link/src/api-iife.js index 6a37d748..d46ebd7d 100644 --- a/plugins/deep-link/src/api-iife.js +++ b/plugins/deep-link/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_DEEPLINK__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function t(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}var r;async function _(e,r,_){const i="string"==typeof _?.target?{kind:"AnyLabel",label:_.target}:_?.target??{kind:"Any"};return t("plugin:event|listen",{event:e,target:i,handler:n(r)}).then((n=>async()=>async function(e,n){await t("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function i(){return await t("plugin:deep-link|get_current")}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WEBVIEW_CREATED="tauri://webview-created",e.WEBVIEW_FILE_DROP="tauri://file-drop",e.WEBVIEW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WEBVIEW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(r||(r={})),e.getCurrent=i,e.onOpenUrl=async function(e){const n=await i();return null!=n&&e(n),await _("deep-link://new-url",(n=>e(n.payload)))},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_PLUGIN_DEEPLINK__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_DEEPLINK__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function t(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}var r;async function i(e,r,i){const _="string"==typeof i?.target?{kind:"AnyLabel",label:i.target}:i?.target??{kind:"Any"};return t("plugin:event|listen",{event:e,target:_,handler:n(r)}).then((n=>async()=>async function(e,n){await t("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function _(){return await t("plugin:deep-link|get_current")}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WEBVIEW_CREATED="tauri://webview-created",e.FILE_DROP="tauri://file-drop",e.FILE_DROP_HOVER="tauri://file-drop-hover",e.FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(r||(r={})),e.getCurrent=_,e.onOpenUrl=async function(e){const n=await _();return null!=n&&e(n),await i("deep-link://new-url",(n=>e(n.payload)))},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_PLUGIN_DEEPLINK__})} diff --git a/plugins/store/android/build.gradle.kts b/plugins/store/android/build.gradle.kts new file mode 100644 index 00000000..f7d16191 --- /dev/null +++ b/plugins/store/android/build.gradle.kts @@ -0,0 +1,40 @@ +plugins { + id("com.android.library") + id("org.jetbrains.kotlin.android") +} + +android { + namespace = "app.tauri.store" + compileSdk = 33 + + defaultConfig { + minSdk = 19 + targetSdk = 33 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + implementation("androidx.core:core-ktx:1.9.0") + implementation("com.fasterxml.jackson.core:jackson-databind:2.15.3") + implementation(project(":tauri-android")) +} diff --git a/plugins/store/android/proguard-rules.pro b/plugins/store/android/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/plugins/store/android/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/plugins/store/android/settings.gradle b/plugins/store/android/settings.gradle new file mode 100644 index 00000000..14a752e4 --- /dev/null +++ b/plugins/store/android/settings.gradle @@ -0,0 +1,2 @@ +include ':tauri-android' +project(':tauri-android').projectDir = new File('./.tauri/tauri-api') diff --git a/plugins/store/android/src/main/AndroidManifest.xml b/plugins/store/android/src/main/AndroidManifest.xml new file mode 100644 index 00000000..9a40236b --- /dev/null +++ b/plugins/store/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/plugins/store/android/src/main/java/StorePlugin.kt b/plugins/store/android/src/main/java/StorePlugin.kt new file mode 100644 index 00000000..8389661f --- /dev/null +++ b/plugins/store/android/src/main/java/StorePlugin.kt @@ -0,0 +1,50 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +package app.tauri.store + +import android.app.Activity +import app.tauri.annotation.Command +import app.tauri.annotation.TauriPlugin +import app.tauri.plugin.Invoke +import app.tauri.plugin.Plugin +import com.fasterxml.jackson.databind.JsonNode +import com.fasterxml.jackson.databind.ObjectMapper +import java.io.File + +@TauriPlugin +class StorePlugin(private val activity: Activity) : Plugin(activity) { + @Command + fun load(invoke: Invoke) { + try { + val path = invoke.parseArgs(String::class.java) + val file = File(activity.applicationContext.getExternalFilesDir(null), path) + + invoke.resolveObject(ObjectMapper().readTree(file)) + } catch (ex: Exception) { + invoke.reject(ex.message) + } + } + + @Command + fun save(invoke: Invoke) { + try { + val args = invoke.parseArgs(JsonNode::class.java) + val path = args.get("store").asText() + val cache = args.get("cache") + val file = File(activity.applicationContext.getExternalFilesDir(null), path) + + if (!file.exists()) { + file.parentFile?.mkdirs() + file.createNewFile() + } + + file.writeText(cache.toString()) + + invoke.resolve() + } catch (ex: Exception) { + invoke.reject(ex.message) + } + } +} \ No newline at end of file diff --git a/plugins/store/build.rs b/plugins/store/build.rs index 30ed3968..140b4a85 100644 --- a/plugins/store/build.rs +++ b/plugins/store/build.rs @@ -8,5 +8,8 @@ const COMMANDS: &[&str] = &[ ]; fn main() { - tauri_plugin::Builder::new(COMMANDS).build(); + tauri_plugin::Builder::new(COMMANDS) + .android_path("android") + .ios_path("ios") + .build(); } diff --git a/plugins/store/ios/Package.resolved b/plugins/store/ios/Package.resolved new file mode 100644 index 00000000..5f998e0e --- /dev/null +++ b/plugins/store/ios/Package.resolved @@ -0,0 +1,16 @@ +{ + "object": { + "pins": [ + { + "package": "SwiftRs", + "repositoryURL": "https://github.com/Brendonovich/swift-rs", + "state": { + "branch": null, + "revision": "b5ed223fcdab165bc21219c1925dc1e77e2bef5e", + "version": "1.0.6" + } + } + ] + }, + "version": 1 +} diff --git a/plugins/store/ios/Package.swift b/plugins/store/ios/Package.swift new file mode 100644 index 00000000..fdf5f69a --- /dev/null +++ b/plugins/store/ios/Package.swift @@ -0,0 +1,33 @@ +// swift-tools-version:5.3 +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +import PackageDescription + +let package = Package( + name: "tauri-plugin-store", + platforms: [ + .iOS(.v13), + ], + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "tauri-plugin-store", + type: .static, + targets: ["tauri-plugin-store"]), + ], + dependencies: [ + .package(name: "Tauri", path: "../.tauri/tauri-api") + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "tauri-plugin-store", + dependencies: [ + .byName(name: "Tauri") + ], + path: "Sources") + ] +) diff --git a/plugins/store/ios/Sources/StorePlugin.swift b/plugins/store/ios/Sources/StorePlugin.swift new file mode 100644 index 00000000..4f651a5e --- /dev/null +++ b/plugins/store/ios/Sources/StorePlugin.swift @@ -0,0 +1,217 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +import Foundation + +import SwiftRs +import Tauri +import UIKit +import WebKit + + +struct SaveStore: Codable { + let store: String + let cache: [String: JSON] +} + +class StorePlugin: Plugin { + @objc public func save(_ invoke: Invoke) throws { + do { + let args = try invoke.parseArgs(SaveStore.self) + let store = args.store + let cache = args.cache + let fileURL = getUrlFromPath(path: store, createDirs: true) + + try JSONEncoder().encode(cache).write(to: fileURL) + invoke.resolve() + } catch { + invoke.reject(error.localizedDescription) + } + } + + @objc public func load(_ invoke: Invoke) throws { + do { + let path = try invoke.parseArgs(String.self) + let fileURL = getUrlFromPath(path: path, createDirs: false) + let data = try String(contentsOf: fileURL) + let passData = dictionary(text: data) + + invoke.resolve(passData) + } catch { + invoke.reject(error.localizedDescription) + } + } + + func dictionary(text: String) -> [String: Any?] { + if let data = text.data(using: .utf8) { + do { + return try JSONSerialization.jsonObject(with: data, options: []) as! [String: Any] + } catch { + fatalError(error.localizedDescription) + } + } + + return [:] + } + + func getUrlFromPath(path: String, createDirs: Bool) -> URL { + do { + var url = try FileManager.default + .url( + for: .applicationSupportDirectory, + in: .userDomainMask, + appropriateFor: nil, + create: true + ) + let components = path.split(separator: "/").map { element in String(element) } + + if components.count == 1 { + return url.appendPath(path: path, isDirectory: false) + } + + for i in 0.. 1 && createDirs { + try FileManager.default.createDirectory(at: url, withIntermediateDirectories: true) + } + + url = url.appendPath(path: components.last!, isDirectory: false) + + return url + } catch { + fatalError(error.localizedDescription) + } + } +} + + +@_cdecl("init_plugin_store") +func initPlugin() -> Plugin { + return StorePlugin() +} + +private extension URL { + func appendPath(path: String, isDirectory: Bool) -> URL { + if #available(iOS 16.0, *) { + return self.appending(path: path, directoryHint: isDirectory ? .isDirectory : .notDirectory) + } else { + return self.appendingPathComponent(path, isDirectory: isDirectory) + } + } +} + +public enum JSON : Codable { + case null + case number(NSNumber) + case string(String) + case array([JSON]) + case bool(Bool) + case dictionary([String : JSON]) + + public var value: Any? { + switch self { + case .null: return nil + case .number(let number): return number + case .string(let string): return string + case .bool(let bool): return bool + case .array(let array): return array.map { $0.value } + case .dictionary(let dictionary): return dictionary.mapValues { $0.value } + } + } + + public init?(_ value: Any?) { + guard let value = value else { + self = .null + return + } + + if let bool = value as? Bool { + self = .bool(bool) + } else if let int = value as? Int { + self = .number(NSNumber(value: int)) + } else if let double = value as? Double { + self = .number(NSNumber(value: double)) + } else if let string = value as? String { + self = .string(string) + } else if let array = value as? [Any] { + var mapped = [JSON]() + for inner in array { + guard let inner = JSON(inner) else { + return nil + } + + mapped.append(inner) + } + + self = .array(mapped) + } else if let dictionary = value as? [String : Any] { + var mapped = [String : JSON]() + for (key, inner) in dictionary { + guard let inner = JSON(inner) else { + return nil + } + + mapped[key] = inner + } + + self = .dictionary(mapped) + } else { + return nil + } + } + + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + guard !container.decodeNil() else { + self = .null + return + } + + if let bool = try container.decodeIfMatched(Bool.self) { + self = .bool(bool) + } else if let int = try container.decodeIfMatched(Int.self) { + self = .number(NSNumber(value: int)) + } else if let double = try container.decodeIfMatched(Double.self) { + self = .number(NSNumber(value: double)) + } else if let string = try container.decodeIfMatched(String.self) { + self = .string(string) + } else if let array = try container.decodeIfMatched([JSON].self) { + self = .array(array) + } else if let dictionary = try container.decodeIfMatched([String : JSON].self) { + self = .dictionary(dictionary) + } else { + throw DecodingError.typeMismatch(JSON.self, DecodingError.Context(codingPath: decoder.codingPath, debugDescription: "Unable to decode JSON as any of the possible types.")) + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + + switch self { + case .null: try container.encodeNil() + case .bool(let bool): try container.encode(bool) + case .number(let number): + if number.objCType.pointee == 0x64 /* 'd' */ { + try container.encode(number.doubleValue) + } else { + try container.encode(number.intValue) + } + case .string(let string): try container.encode(string) + case .array(let array): try container.encode(array) + case .dictionary(let dictionary): try container.encode(dictionary) + } + } +} + +fileprivate extension SingleValueDecodingContainer { + func decodeIfMatched(_ type: T.Type) throws -> T? { + do { + return try self.decode(T.self) + } catch DecodingError.typeMismatch { + return nil + } + } +} diff --git a/plugins/store/src/desktop.rs b/plugins/store/src/desktop.rs new file mode 100644 index 00000000..3e98080e --- /dev/null +++ b/plugins/store/src/desktop.rs @@ -0,0 +1,49 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +use crate::Error; +use crate::Runtime; +use crate::Store; +use std::fs::create_dir_all; +use std::fs::read; +use std::fs::File; +use std::io::Write; +use tauri::Manager; + +#[cfg(desktop)] +impl Store { + pub fn save(&self) -> Result<(), Error> { + let app_dir = self + .app + .path() + .app_data_dir() + .expect("failed to resolve app dir"); + let store_path = app_dir.join(&self.path); + + create_dir_all(store_path.parent().expect("invalid store path"))?; + + let bytes = (self.serialize)(&self.cache).map_err(Error::Serialize)?; + let mut f = File::create(&store_path)?; + f.write_all(&bytes)?; + + Ok(()) + } + + /// Update the store from the on-disk state + pub fn load(&mut self) -> Result<(), Error> { + let app_dir = self + .app + .path() + .app_data_dir() + .expect("failed to resolve app dir"); + let store_path = app_dir.join(&self.path); + + let bytes = read(store_path)?; + + self.cache + .extend((self.deserialize)(&bytes).map_err(Error::Deserialize)?); + + Ok(()) + } +} diff --git a/plugins/store/src/error.rs b/plugins/store/src/error.rs index 0a04bb09..d8ce9bb5 100644 --- a/plugins/store/src/error.rs +++ b/plugins/store/src/error.rs @@ -5,10 +5,19 @@ use serde::{Serialize, Serializer}; use std::path::PathBuf; +pub type Result = std::result::Result; + /// The error types. #[derive(thiserror::Error, Debug)] #[non_exhaustive] pub enum Error { + #[cfg(mobile)] + #[error(transparent)] + PluginInvoke(#[from] tauri::plugin::mobile::PluginInvokeError), + /// Mobile plugin handled is not initialized, Probably [`StoreBuilder::mobile_plugin_handle`] was not called. + #[cfg(mobile)] + #[error("Mobile plugin handled is not initialized, Perhaps you forgot to call StoreBuilder::mobile_plugin_handle")] + MobilePluginHandleUnInitialized, #[error("Failed to serialize store. {0}")] Serialize(Box), #[error("Failed to deserialize store. {0}")] diff --git a/plugins/store/src/lib.rs b/plugins/store/src/lib.rs index f76752f8..700b058e 100644 --- a/plugins/store/src/lib.rs +++ b/plugins/store/src/lib.rs @@ -11,7 +11,7 @@ html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png" )] -pub use error::Error; +pub use error::{Error, Result}; use log::warn; use serde::Serialize; pub use serde_json::Value as JsonValue; @@ -29,6 +29,18 @@ use tauri::{ mod error; mod store; +#[cfg(mobile)] +mod mobile; +#[cfg(mobile)] +use crate::plugin::PluginHandle; +#[cfg(target_os = "android")] +const PLUGIN_IDENTIFIER: &str = "app.tauri.store"; +#[cfg(target_os = "ios")] +tauri::ios_plugin_binding!(init_plugin_store); + +#[cfg(desktop)] +mod desktop; + #[derive(Serialize, Clone)] struct ChangePayload<'a> { path: &'a Path, @@ -36,18 +48,20 @@ struct ChangePayload<'a> { value: &'a JsonValue, } -#[derive(Default)] -pub struct StoreCollection { +struct StoreCollection { stores: Mutex>>, frozen: bool, + + #[cfg(mobile)] + mobile_plugin_handle: PluginHandle, } -pub fn with_store) -> Result>( +fn with_store) -> Result>( app: AppHandle, collection: State<'_, StoreCollection>, path: impl AsRef, f: F, -) -> Result { +) -> Result { let mut stores = collection.stores.lock().expect("mutex poisoned"); let path = path.as_ref(); @@ -55,7 +69,17 @@ pub fn with_store) -> Result>( if collection.frozen { return Err(Error::NotFound(path.to_path_buf())); } - let mut store = StoreBuilder::new(path).build(app); + + #[allow(unused_mut)] + let mut builder = StoreBuilder::new(path); + + #[cfg(mobile)] + { + builder = builder.mobile_plugin_handle(collection.mobile_plugin_handle.clone()); + } + + let mut store = builder.build(app); + // ignore loading errors, just use the default if let Err(err) = store.load() { warn!( @@ -78,7 +102,7 @@ async fn set( path: PathBuf, key: String, value: JsonValue, -) -> Result<(), Error> { +) -> Result<()> { with_store(app, stores, path, |store| store.insert(key, value)) } @@ -88,7 +112,7 @@ async fn get( stores: State<'_, StoreCollection>, path: PathBuf, key: String, -) -> Result, Error> { +) -> Result> { with_store(app, stores, path, |store| Ok(store.get(key).cloned())) } @@ -98,7 +122,7 @@ async fn has( stores: State<'_, StoreCollection>, path: PathBuf, key: String, -) -> Result { +) -> Result { with_store(app, stores, path, |store| Ok(store.has(key))) } @@ -108,7 +132,7 @@ async fn delete( stores: State<'_, StoreCollection>, path: PathBuf, key: String, -) -> Result { +) -> Result { with_store(app, stores, path, |store| store.delete(key)) } @@ -117,7 +141,7 @@ async fn clear( app: AppHandle, stores: State<'_, StoreCollection>, path: PathBuf, -) -> Result<(), Error> { +) -> Result<()> { with_store(app, stores, path, |store| store.clear()) } @@ -126,7 +150,7 @@ async fn reset( app: AppHandle, collection: State<'_, StoreCollection>, path: PathBuf, -) -> Result<(), Error> { +) -> Result<()> { with_store(app, collection, path, |store| store.reset()) } @@ -135,7 +159,7 @@ async fn keys( app: AppHandle, stores: State<'_, StoreCollection>, path: PathBuf, -) -> Result, Error> { +) -> Result> { with_store(app, stores, path, |store| { Ok(store.keys().cloned().collect()) }) @@ -146,7 +170,7 @@ async fn values( app: AppHandle, stores: State<'_, StoreCollection>, path: PathBuf, -) -> Result, Error> { +) -> Result> { with_store(app, stores, path, |store| { Ok(store.values().cloned().collect()) }) @@ -157,7 +181,7 @@ async fn entries( app: AppHandle, stores: State<'_, StoreCollection>, path: PathBuf, -) -> Result, Error> { +) -> Result> { with_store(app, stores, path, |store| { Ok(store .entries() @@ -171,7 +195,7 @@ async fn length( app: AppHandle, stores: State<'_, StoreCollection>, path: PathBuf, -) -> Result { +) -> Result { with_store(app, stores, path, |store| Ok(store.len())) } @@ -180,7 +204,7 @@ async fn load( app: AppHandle, stores: State<'_, StoreCollection>, path: PathBuf, -) -> Result<(), Error> { +) -> Result<()> { with_store(app, stores, path, |store| store.load()) } @@ -189,7 +213,7 @@ async fn save( app: AppHandle, stores: State<'_, StoreCollection>, path: PathBuf, -) -> Result<(), Error> { +) -> Result<()> { with_store(app, stores, path, |store| store.save()) } @@ -306,9 +330,17 @@ impl Builder { } } + #[cfg(target_os = "android")] + let handle = _api.register_android_plugin(PLUGIN_IDENTIFIER, "StorePlugin")?; + #[cfg(target_os = "ios")] + let handle = _api.register_ios_plugin(init_plugin_store)?; + app_handle.manage(StoreCollection { stores: Mutex::new(self.stores), frozen: self.frozen, + + #[cfg(mobile)] + mobile_plugin_handle: handle, }); Ok(()) diff --git a/plugins/store/src/mobile.rs b/plugins/store/src/mobile.rs new file mode 100644 index 00000000..7d999fb4 --- /dev/null +++ b/plugins/store/src/mobile.rs @@ -0,0 +1,53 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +use tauri::Runtime; + +use crate::error::Result; +use crate::Store; +use serde_json::Value; +use std::collections::HashMap; + +#[derive(Debug, serde::Serialize, serde::Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct LoadStore { + pub cache: HashMap, +} + +#[derive(Debug, serde::Serialize, serde::Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SaveStore { + pub store: String, + pub cache: HashMap, +} + +#[cfg(mobile)] +impl Store { + pub fn save(&self) -> Result<()> { + self.mobile_plugin_handle + .as_ref() + .ok_or_else(|| crate::error::Error::MobilePluginHandleUnInitialized)? + .run_mobile_plugin( + "save", + SaveStore { + store: self.path.to_string_lossy().to_string(), + cache: self.cache.clone(), + }, + ) + .map_err(Into::into) + } + + pub fn load(&mut self) -> Result<()> { + let result: Value = self + .mobile_plugin_handle + .as_ref() + .ok_or_else(|| crate::error::Error::MobilePluginHandleUnInitialized)? + .run_mobile_plugin("load", self.path.to_string_lossy().to_string())?; + + let map = serde_json::from_value::>(result)?; + self.cache.extend(map); + + Ok(()) + } +} diff --git a/plugins/store/src/store.rs b/plugins/store/src/store.rs index 1a7b6e1b..9437ada1 100644 --- a/plugins/store/src/store.rs +++ b/plugins/store/src/store.rs @@ -2,12 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +#[cfg(mobile)] +use crate::plugin::PluginHandle; use crate::{ChangePayload, Error}; use serde_json::Value as JsonValue; use std::{ collections::HashMap, - fs::{create_dir_all, read, File}, - io::Write, path::{Path, PathBuf}, }; use tauri::{AppHandle, Manager, Runtime}; @@ -30,15 +30,20 @@ fn default_deserialize( } /// Builds a [`Store`] -pub struct StoreBuilder { +pub struct StoreBuilder { path: PathBuf, defaults: Option>, cache: HashMap, serialize: SerializeFn, deserialize: DeserializeFn, + + #[cfg(mobile)] + mobile_plugin_handle: Option>, + #[cfg(not(mobile))] + _marker: std::marker::PhantomData, } -impl StoreBuilder { +impl StoreBuilder { /// Creates a new [`StoreBuilder`]. /// /// # Examples @@ -58,9 +63,19 @@ impl StoreBuilder { cache: Default::default(), serialize: default_serialize, deserialize: default_deserialize, + #[cfg(mobile)] + mobile_plugin_handle: None, + #[cfg(not(mobile))] + _marker: std::marker::PhantomData, } } + #[cfg(mobile)] + pub fn mobile_plugin_handle(mut self, handle: PluginHandle) -> Self { + self.mobile_plugin_handle = Some(handle); + self + } + /// Inserts a default key-value pair. /// /// # Examples @@ -148,7 +163,7 @@ impl StoreBuilder { /// Ok(()) /// }); /// ``` - pub fn build(self, app: AppHandle) -> Store { + pub fn build(self, app: AppHandle) -> Store { Store { app, path: self.path, @@ -156,56 +171,27 @@ impl StoreBuilder { cache: self.cache, serialize: self.serialize, deserialize: self.deserialize, + + #[cfg(mobile)] + mobile_plugin_handle: self.mobile_plugin_handle, } } } #[derive(Clone)] pub struct Store { - app: AppHandle, + pub(crate) app: AppHandle, pub(crate) path: PathBuf, defaults: Option>, - cache: HashMap, - serialize: SerializeFn, - deserialize: DeserializeFn, + pub(crate) cache: HashMap, + pub(crate) serialize: SerializeFn, + pub(crate) deserialize: DeserializeFn, + + #[cfg(mobile)] + pub(crate) mobile_plugin_handle: Option>, } impl Store { - /// Update the store from the on-disk state - pub fn load(&mut self) -> Result<(), Error> { - let app_dir = self - .app - .path() - .app_data_dir() - .expect("failed to resolve app dir"); - let store_path = app_dir.join(&self.path); - - let bytes = read(store_path)?; - - self.cache - .extend((self.deserialize)(&bytes).map_err(Error::Deserialize)?); - - Ok(()) - } - - /// Saves the store to disk - pub fn save(&self) -> Result<(), Error> { - let app_dir = self - .app - .path() - .app_data_dir() - .expect("failed to resolve app dir"); - let store_path = app_dir.join(&self.path); - - create_dir_all(store_path.parent().expect("invalid store path"))?; - - let bytes = (self.serialize)(&self.cache).map_err(Error::Serialize)?; - let mut f = File::create(&store_path)?; - f.write_all(&bytes)?; - - Ok(()) - } - pub fn insert(&mut self, key: String, value: JsonValue) -> Result<(), Error> { self.cache.insert(key.clone(), value.clone()); self.app.emit( From 570fb8f33556ceb601e3e67be33d1d60c7e326ff Mon Sep 17 00:00:00 2001 From: Victor Aremu Date: Tue, 5 Mar 2024 01:03:44 +0100 Subject: [PATCH 8/9] feat: Improve Stronghold (v2) README with usage examples (#1023) feat: add client side usage --- plugins/stronghold/README.md | 73 ++++++++++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/plugins/stronghold/README.md b/plugins/stronghold/README.md index 0b293a2d..caabff64 100644 --- a/plugins/stronghold/README.md +++ b/plugins/stronghold/README.md @@ -52,8 +52,25 @@ First you need to register the core plugin with Tauri: fn main() { tauri::Builder::default() .plugin(tauri_plugin_stronghold::Builder::new(|password| { - // TODO: hash the password here with e.g. argon2, blake2b or any other secure algorithm - todo!() + // Hash the password here with e.g. argon2, blake2b or any other secure algorithm + // Here is an example implementation using the `rust-argon2` crate for hashing the password + + use argon2::{hash_raw, Config, Variant, Version}; + + let config = Config { + lanes: 4, + mem_cost: 10_000, + time_cost: 10, + variant: Variant::Argon2id, + version: Version::Version13, + ..Default::default() + }; + + let salt = "your-salt".as_bytes(); + + let key = hash_raw(password.as_ref(), salt, &config).expect("failed to hash password"); + + key.to_vec() }) .build()) .run(tauri::generate_context!()) @@ -64,9 +81,57 @@ fn main() { Afterwards all the plugin's APIs are available through the JavaScript guest bindings: ```javascript -import { Stronghold, Location } from "@tauri-apps/plugin-stronghold"; +import { Stronghold, Location, Client } from "tauri-plugin-stronghold-api"; +import { appDataDir } from "@tauri-apps/api/path"; + +const initStrongHold = async () => { + const vaultPath = `${await appDataDir()}/vault.hold`; + + const vaultKey = "The key to the vault"; + + const stronghold = await Stronghold.load(vaultPath, vaultKey); + + let client: Client; + + const clientName = "name your client"; + + try { + client = await hold.loadClient(clientName); + } catch { + client = await hold.createClient(clientName); + } + + return { + stronghold, + client, + }; +}; + +const { stronghold, client } = await initStrongHold(); + +const store = client.getStore(); + +const key = "my_key"; + +// Insert a record to the store + +const data = Array.from(new TextEncoder().encode("Hello, World!")); + +await store.insert(key, data); + +// Read a record from store + +const data = await store.get(key); + +const value = new TextDecoder().decode(new Uint8Array(data)); + +// Save your updates + +await stronghold.save(); + +// Remove a record from store -// TODO +await store.remove(key); ``` ## Contributing From 54cd4a58b84132388232b6ad29de7c4613292bf1 Mon Sep 17 00:00:00 2001 From: Victor Aremu Date: Tue, 5 Mar 2024 11:21:24 +0100 Subject: [PATCH 9/9] chore(stronghold): readme typo (#1028) --- plugins/stronghold/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/stronghold/README.md b/plugins/stronghold/README.md index caabff64..b89401d2 100644 --- a/plugins/stronghold/README.md +++ b/plugins/stronghold/README.md @@ -84,7 +84,7 @@ Afterwards all the plugin's APIs are available through the JavaScript guest bind import { Stronghold, Location, Client } from "tauri-plugin-stronghold-api"; import { appDataDir } from "@tauri-apps/api/path"; -const initStrongHold = async () => { +const initStronghold = async () => { const vaultPath = `${await appDataDir()}/vault.hold`; const vaultKey = "The key to the vault"; @@ -107,7 +107,7 @@ const initStrongHold = async () => { }; }; -const { stronghold, client } = await initStrongHold(); +const { stronghold, client } = await initStronghold(); const store = client.getStore();