Add editing of client access rules

Saved rules and client form drafts can now be edited through the rule
modal. On the Rules tab, saving re-runs client setup so the firewall
matches, and both add and edit ask for confirmation.

Comma-separated destinations were rejected because drafts were validated
before being split; validate each one after splitting instead. When
editing, the first destination updates the rule and the rest are added
as new rules.

Pin the id in the client_rules PUT handler so a request body can't
change it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-01 14:27:10 +01:00
co-authored by Claude Opus 5.5
parent 577f3828c8
commit 77ced6cc52
13 changed files with 416 additions and 138 deletions
@@ -57,6 +57,7 @@ export default async function (
rule: {
...existing,
...body.update_data,
id: existing.id,
},
client_id: existing.client_id,
user_id: existing.user_id,