v2.1.12 - Implement multi-admin auth cache and checks, add admin management commands, and add multi-admin integration test

This commit is contained in:
Laan Tungir
2026-04-03 15:46:33 -04:00
parent 232f93c16f
commit fd3efdd01f
15 changed files with 2008 additions and 145 deletions
+1 -2
View File
@@ -501,8 +501,7 @@ int process_nip17_admin_command(cJSON* dm_event, char* error_message, size_t err
const char* sender_pubkey = cJSON_GetStringValue(sender_pubkey_obj);
// Check if sender is admin
const char* admin_pubkey = get_config_value("admin_pubkey");
int is_admin = admin_pubkey && strlen(admin_pubkey) > 0 && strcmp(sender_pubkey, admin_pubkey) == 0;
int is_admin = is_admin_pubkey(sender_pubkey);
DEBUG_INFO("DM_ADMIN: Sender pubkey: %.16s... (admin: %s)", sender_pubkey, is_admin ? "YES" : "NO");