Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tauri-cli): prevent accidental object permission rm #11985

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

ShaunSHamilton
Copy link
Contributor

The test failures do not make sense to me. Looks like one of the slices just moved index.

Noticed the bug with the following src-tauri/capabilities/default.json:

{
  "$schema": "../gen/schemas/desktop-schema.json",
  "identifier": "default",
  "description": "Capability for the main window",
  "windows": [
    "main"
  ],
  "permissions": [
    "core:path:default",
    "core:event:default",
    "core:app:default",
    "core:image:default",
    "core:resources:default",
    "core:menu:default",
    "core:tray:default",
    "shell:allow-open",
    "dialog:default",
    "updater:default",
    "core:window:allow-destroy",
    {
      "identifier": "http:default",
      "allow": [
        {
          "url": "http://localhost:*"
        }
      ]
    }
  ]
}

Ran tauri remove shell, and the following diff was generated:

--- a/src-tauri/capabilities/default.json
+++ b/src-tauri/capabilities/default.json
@@ -13,23 +13,8 @@
     "core:resources:default",
     "core:menu:default",
     "core:tray:default",
-    "shell:allow-open",
     "dialog:default",
     "updater:default",
-    "core:window:allow-destroy",
-    {
-      "identifier": "http:default",
-      "allow": [
-        {
-          "url": "http://localhost:*"
-        }
-      ]
-    }
+    "core:window:allow-destroy"
   ]
 }

I am unsure what the correct toml config may look like, but assumed inline tables were the equivalent.

@ShaunSHamilton ShaunSHamilton requested a review from a team as a code owner December 16, 2024 11:12
Copy link
Contributor

github-actions bot commented Dec 16, 2024

Package Changes Through 5f188ba

There are 8 changes which include @tauri-apps/api with minor, tauri-bundler with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with patch

Planned Package Versions

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

package current next
@tauri-apps/api 2.1.1 2.2.0
tauri-utils 2.1.0 2.1.1
tauri-bundler 2.1.0 2.2.0
tauri-runtime 2.2.0 2.3.0
tauri-runtime-wry 2.2.0 2.3.0
tauri-codegen 2.0.3 2.0.4
tauri-macros 2.0.3 2.0.4
tauri-plugin 2.0.3 2.0.4
tauri-build 2.0.3 2.0.4
tauri 2.1.1 2.2.0
@tauri-apps/cli 2.1.0 2.2.0
tauri-cli 2.1.0 2.2.0

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


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant