feat: detect duplicates in csv
This commit is contained in:
@@ -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'] ?? ''));
|
||||
|
||||
Reference in New Issue
Block a user