From 5fe0a8812cf6a35a91e4becede6b7b652902f164 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 28 Nov 2021 11:13:28 +0100 Subject: [PATCH] Monitoring permissions for single services only --- library/Director/Monitoring.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/Director/Monitoring.php b/library/Director/Monitoring.php index e86ea5bd..f5d41087 100644 --- a/library/Director/Monitoring.php +++ b/library/Director/Monitoring.php @@ -63,6 +63,10 @@ class Monitoring public function authCanEditService(Auth $auth, $hostname, $service) { + if ($hostname === null || $service === null) { + // TODO: UUID support! + return false; + } if ($auth->hasPermission('director/monitoring/services')) { $restriction = null; foreach ($auth->getRestrictions('director/monitoring/rw-object-filter') as $restriction) {