Make access-control domains an editable list, and stop saves eating the rule labels

The block is rebuilt from the parsed model on every save and the parser discarded comments,
so one press of Save deleted the five ## lines that are the only thing in the file saying
what each rule is for — which inline editing was about to make far easier to press.
This commit is contained in:
Gmer4Lfe
2026-08-15 11:30:36 -04:00
parent b22d034933
commit 693ac693a4
3 changed files with 227 additions and 33 deletions
+3 -1
View File
@@ -131,7 +131,9 @@ $result = match ($action) {
'lldap_add_to_group' => vv_lldap_add_to_group($_POST['uid'] ?? '', (int)($_POST['gid'] ?? 0)),
'lldap_remove_from_group' => vv_lldap_remove_from_group($_POST['uid'] ?? '', (int)($_POST['gid'] ?? 0)),
// Authelia
'authelia_save' => vv_authelia_write_rules(json_decode($_POST['rules'] ?? '[]', true) ?: [], $_POST['default_policy'] ?? 'deny'),
'authelia_save' => vv_authelia_write_rules(json_decode($_POST['rules'] ?? '[]', true) ?: [],
$_POST['default_policy'] ?? 'deny',
$_POST['default_note'] ?? ''),
default => ['ok' => false, 'error' => 'Unknown action: ' . $action],
};