mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
parent
57c256cf91
commit
44e9ec2867
@ -37,7 +37,7 @@ class HostActions extends HostActionsHook
|
||||
);
|
||||
}
|
||||
|
||||
if (IcingaHost::exists($hostname, $db)) {
|
||||
if (Util::hasPermission('director/hosts') && IcingaHost::exists($hostname, $db)) {
|
||||
$actions['Modify'] = Url::fromPath(
|
||||
'director/host/edit',
|
||||
array('name' => $hostname)
|
||||
|
@ -48,8 +48,16 @@ class ServiceActions extends ServiceActionsHook
|
||||
]);
|
||||
}
|
||||
|
||||
if (Util::hasPermission('director/hosts')) {
|
||||
$title = mt('director', 'Modify');
|
||||
} elseif (Util::hasPermission('director/monitoring/services-ro')) {
|
||||
$title = mt('director', 'Configuration');
|
||||
} else {
|
||||
return $actions;
|
||||
}
|
||||
|
||||
if (IcingaHost::exists($hostname, $db)) {
|
||||
$actions['Modify'] = Url::fromPath('director/host/findservice', [
|
||||
$actions[$title] = Url::fromPath('director/host/findservice', [
|
||||
'name' => $hostname,
|
||||
'service' => $service->service_description
|
||||
]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user