Codechange: use enum class for CompanyAllowListCtrlAction

This commit is contained in:
Peter Nelson
2026-02-16 20:08:05 +00:00
committed by Peter Nelson
parent d09b91cd92
commit 1c095ba464
5 changed files with 19 additions and 21 deletions
+2 -2
View File
@@ -2146,7 +2146,7 @@ static void PerformNetworkAuthorizedKeyAction(std::string_view name, NetworkAuth
authorized_keys->Add(authorized_key);
} else {
AutoRestoreBackup backup(_current_company, company);
Command<Commands::CompanyAllowListControl>::Post(CALCA_ADD, authorized_key);
Command<Commands::CompanyAllowListControl>::Post(CompanyAllowListCtrlAction::AddKey, authorized_key);
}
IConsolePrint(CC_INFO, "Added {} to {}.", authorized_key, name);
return;
@@ -2161,7 +2161,7 @@ static void PerformNetworkAuthorizedKeyAction(std::string_view name, NetworkAuth
authorized_keys->Remove(authorized_key);
} else {
AutoRestoreBackup backup(_current_company, company);
Command<Commands::CompanyAllowListControl>::Post(CALCA_REMOVE, authorized_key);
Command<Commands::CompanyAllowListControl>::Post(CompanyAllowListCtrlAction::RemoveKey, authorized_key);
}
IConsolePrint(CC_INFO, "Removed {} from {}.", authorized_key, name);
return;