Skip to content

enhance(acl): suggest closest identifier for unknown permissions - #16280

Merged
lucasfernog merged 8 commits into
tauri-apps:devfrom
marrionesa:feat/acl-permission-did-you-mean
Oct 13, 2026
Merged

lucasfernog merged 8 commits into
tauri-apps:devfrom
marrionesa:feat/acl-permission-did-you-mean

Conversation

@marrionesa

Copy link
Copy Markdown
Contributor

Summary

  • Suggest the closest known permission identifier when build-time ACL validation encounters an unknown permission.
  • Combine Jaro-Winkler and normalized Levenshtein similarity thresholds to reduce misleading suggestions.
  • Restrict suggestions to candidates within the same namespace.
  • Preserve the existing error message when no sufficiently similar candidate is found.
  • Add unit tests covering misspellings, closest-match selection, incomplete identifiers, different namespaces, unrelated identifiers, empty candidates, and exact matches.

Testing

  • cargo test -p tauri-build --all-features — passed.
  • cargo clippy -p tauri-build --all-targets --all-features -- -D warnings — passed.
  • cargo check --locked -p tauri-build — passed.
  • cargo fmt --all — passed.
  • git diff --check — passed.
  • ACL integration preflight — 8 passed, 0 failed.

@marrionesa

Copy link
Copy Markdown
Contributor Author

After the first two commits, further testing revealed potential false positives in permission suggestions. I pushed a third commit to address these cases, and the updated tests pass locally.

@github-actions

Copy link
Copy Markdown
Contributor

Package Changes Through 3ffbf29

There are 5 changes which include tauri-build with patch, tauri with patch, tauri-cli with patch, @tauri-apps/cli with patch, tauri-bundler 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-bundler 2.10.2 2.10.3
tauri-build 2.7.2 2.7.3
tauri 2.12.3 2.12.4
@tauri-apps/cli 2.12.2 2.12.3
tauri-cli 2.12.2 2.12.3

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


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

@lucasfernog
lucasfernog merged commit e140a1c into tauri-apps:dev Oct 13, 2026
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants