summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics
diff options
context:
space:
mode:
authorSimon Rettberg2025-08-04 16:05:24 +0200
committerSimon Rettberg2025-08-04 16:05:24 +0200
commit836f6b8e2b0051eb3a46d3b1232b9cdfab1ccdf9 (patch)
tree3ed1740338e631c611aca9e8cd28d6a995ca0ef6 /modules-available/statistics
parentImplicitly nullable types are deprecated in PHP 8.3, make explicit (diff)
downloadslx-admin-836f6b8e2b0051eb3a46d3b1232b9cdfab1ccdf9.tar.gz
slx-admin-836f6b8e2b0051eb3a46d3b1232b9cdfab1ccdf9.tar.xz
slx-admin-836f6b8e2b0051eb3a46d3b1232b9cdfab1ccdf9.zip
A few more HTTP code audit log fixups
Diffstat (limited to 'modules-available/statistics')
-rw-r--r--modules-available/statistics/page.inc.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules-available/statistics/page.inc.php b/modules-available/statistics/page.inc.php
index b8717fb8..a2a51ce6 100644
--- a/modules-available/statistics/page.inc.php
+++ b/modules-available/statistics/page.inc.php
@@ -174,7 +174,7 @@ class Page_Statistics extends Page
}
$task = RebootControl::execute($allowedMachines, $action, 0);
if (Taskmanager::isTask($task)) {
- Util::redirect("?do=rebootcontrol&show=task&what=task&taskid=" . $task["id"]);
+ Util::redirect("?do=rebootcontrol&show=task&what=task&taskid=" . $task["id"], 200);
}
}
@@ -235,7 +235,7 @@ class Page_Statistics extends Page
$allowedLocations = User::getAllowedLocations("machine.delete");
if (empty($allowedLocations)) {
Message::addError('main.no-permission');
- Util::redirect('?do=statistics');
+ return;
}
$res = Database::simpleQuery('SELECT machineuuid, locationid FROM machine WHERE machineuuid IN (:ids)', compact('ids'));
$ids = array_flip($ids);
@@ -248,7 +248,10 @@ class Page_Statistics extends Page
Message::addError('locations.no-permission-location', $row['locationid']);
}
}
- if (!empty($delete)) {
+ if (empty($delete)) {
+ Audit::overrideResponseCode(403);
+ } else {
+ Audit::overrideResponseCode(200);
if ($soft) {
// "Soft delete" -- keep all data, but set IP address to 0.0.0.0, so it will not be assigned to its
// old location anymore. Upon next boot some time in the future, the machine is hopefully relocated