Repository navigation
feat(ui): edit grants and auto approvers in the acl editor - #663
Conversation
There was a problem hiding this comment.
ℹ️ No critical issues — two minor suggestions inline.
Reviewed changes — Grants and auto approvers are now editable in the ACL Rules tab.
- Grants model and editor —
Policygainsgrants: Grant[]and a newGrantDialog; ports/protocols live inip,appcapabilities ride along inextra, andcompactGrantomits an emptyip. - Auto approvers model and editor —
autoApproversbecomes{ routes, exitNode, extra }with a newAutoApproverDialogcovering create, rename, and delete for route and exit-node entries. - Parse/serialize —
grantsandautoApproversmove out ofextraintoKNOWN_KEYS, with round-trip and empty-section handling plus the newisValidRoutevalidator. - Docs and changelog — ACL docs updated to five lists; CHANGELOG entry added.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — incremental re-review of the fix commit ae279f3, which addresses both findings from the prior review (07c6c22).
- App-only grants no longer render a dangling
onlabel — theontext andipchips are now rendered only whenentry.ip.length > 0, so a grant carrying justappcapabilities lists cleanly. isValidRoutenow bounds IPv6 prefixes and validates IPv4 octets — IPv6 prefixes above/128are rejected (fd7a::/129,fd7a::/999), and IPv4 addresses with an octet above 255 (10.0.0.999/8) are rejected, matching the existing/33case; tests were added for all three.
The validator fix reads correctly: the IPv4 branch caps the prefix at /32 and range-checks each octet, and the IPv6 branch keeps the length bound in isValidRoute since isIpv6 is documented as a loose alias check. Both prior review threads are resolved.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ No critical issues — one minor documentation suggestion inline.
Reviewed changes — incremental re-review of 54cd79d, which adds via tag support to grants on top of the two findings already resolved in earlier passes.
- Grant
viasupport —Grantgainsvia: string[],GRANT_KEYSincludes it,toGrants/compactGrantround-trip it (emptyviaomitted), the grant dialog adds a tag-validatedViachip list, and grant rows renderviachips. - Tests and docs — a
viaround-trip test was added, and the ACL docs and CHANGELOG mentionvia.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
c01db78 to
7166e34
Compare
Older Headscale rejects the whole policy with an unknown field error.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — incremental re-review of 4ed9be0, which gates grants editing and saving on Headscale 0.29 or newer.
- Version capability — Added
policySupportsGrants(gte(version, "0.29.0")) toCapabilities. - Server-side refusal — The ACL save action parses the submitted policy and throws a clear
ActionErrorwhengrantsis present on an older server, instead of surfacing Headscale's bareunknown field "grants". - UI gating — The loader exposes
canEditGrantsand the Rules tab hides the Grants section when the capability is off. - Docs and changelog — The version requirement is documented through
versions.headscale.grantsand the CHANGELOG entry. - Tests — The integration test covers save-or-refuse per version, and the contract test asserts grants are accepted on 0.29 while 0.27/0.28 reject them with
unknown field "grants".
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
@tale Thank you! |

Grants came up in #607. Auto approvers overlap with #550, which was written against the earlier editor.