feat: detect duplicates in csv

This commit is contained in:
2026-06-08 04:35:22 +01:00
parent 304892552f
commit a0bff2beb1
11 changed files with 390 additions and 118 deletions
+7
View File
@@ -46,6 +46,13 @@ function handle_get(): never
function handle_post(): never
{
// Only admins may write settings
$groups_raw = $_SERVER['HTTP_X_AUTHENTIK_GROUPS'] ?? '';
$groups = ($groups_raw !== '') ? explode('|', $groups_raw) : [];
if (!in_array('imf_sms_admin', $groups, true)) {
error_out('Forbidden — requires imf_sms_admin group', 403);
}
$body = json_decode((string) file_get_contents('php://input'), true);
$key = trim((string) ($body['key'] ?? ''));