Monitoring permissions for single services only

This commit is contained in:
Thomas Gelf 2021-11-28 11:13:28 +01:00
parent 82656de2c2
commit 5fe0a8812c
1 changed files with 4 additions and 0 deletions

View File

@ -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) {