Skip to content

Remove custom-commands ACL boilerplate - #13975

Merged
mtsgrd merged 1 commit into
masterfrom
remove-custom-commands-acl
May 28, 2026
Merged

Remove custom-commands ACL boilerplate#13975
mtsgrd merged 1 commit into
masterfrom
remove-custom-commands-acl

Conversation

@mtsgrd

@mtsgrd mtsgrd commented May 28, 2026

Copy link
Copy Markdown
Contributor

tauri 2.11.1 includes tauri-apps/tauri#15266, which enforces ACL for
non-local origins even when no AppManifest is configured. The hand-rolled
allow-custom-commands permission existed solely to flip
has_app_acl_manifest so custom command invocations from local origins
would not bypass the ACL gate (and, by side effect, also be checked for
remote origins).

With the upstream fix in place, remote origins are checked regardless,
and local origins remain permissive without an AppManifest. The
capability declares local: true, so the workaround is no longer
load-bearing.

Drop permissions/default.toml, the allow-custom-commands entry from
capabilities/main.json, and the explicit try_build(... AppManifest ...)
plumbing in build.rs -- back to plain tauri_build::build().

Copilot AI review requested due to automatic review settings May 28, 2026 11:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes now-unneeded Tauri ACL workaround plumbing after the project’s Tauri dependency includes the upstream remote-origin ACL fix.

Changes:

  • Deletes the hand-maintained custom command permission manifest.
  • Removes the allow-custom-commands capability entry.
  • Reverts the Tauri build script to plain tauri_build::build().

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
crates/gitbutler-tauri/permissions/default.toml Removes the custom permission list for all application commands.
crates/gitbutler-tauri/capabilities/main.json Drops the deleted allow-custom-commands permission reference.
crates/gitbutler-tauri/build.rs Removes explicit AppManifest build setup and uses default Tauri build behavior.

tauri 2.11.1 includes tauri-apps/tauri#15266, which enforces ACL for
non-local origins even when no AppManifest is configured. The hand-rolled
`allow-custom-commands` permission existed solely to flip
`has_app_acl_manifest` so custom command invocations from local origins
would not bypass the ACL gate (and, by side effect, also be checked for
remote origins).

With the upstream fix in place, remote origins are checked regardless,
and local origins remain permissive without an AppManifest. The
capability declares `local: true`, so the workaround is no longer
load-bearing.

Drop `permissions/default.toml`, the `allow-custom-commands` entry from
`capabilities/main.json`, and the explicit `try_build(... AppManifest ...)`
plumbing in `build.rs` -- back to plain `tauri_build::build()`.
@mtsgrd
mtsgrd force-pushed the remove-custom-commands-acl branch from 9ff9992 to c1f7d1d Compare May 28, 2026 12:00
@github-actions github-actions Bot added the rust Pull requests that update Rust code label May 28, 2026
@mtsgrd
mtsgrd merged commit 5e81c4d into master May 28, 2026
39 checks passed
@mtsgrd
mtsgrd deleted the remove-custom-commands-acl branch May 28, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants