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:
@@ -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],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user