From e6d4dfc040bbe3cb80a2ce65b82493b557f751fc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:17:48 +0200 Subject: Merging upstream version 1.11.1. Signed-off-by: Daniel Baumann --- library/Director/Web/Widget/AdditionalTableActions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'library/Director/Web/Widget/AdditionalTableActions.php') diff --git a/library/Director/Web/Widget/AdditionalTableActions.php b/library/Director/Web/Widget/AdditionalTableActions.php index 978f399..7495189 100644 --- a/library/Director/Web/Widget/AdditionalTableActions.php +++ b/library/Director/Web/Widget/AdditionalTableActions.php @@ -2,6 +2,7 @@ namespace Icinga\Module\Director\Web\Widget; +use Icinga\Module\Director\Auth\Permission; use ipl\Html\Html; use ipl\Html\HtmlDocument; use gipfl\IcingaWeb2\Icon; @@ -35,10 +36,10 @@ class AdditionalTableActions public function appendTo(HtmlDocument $parent) { $links = []; - if ($this->hasPermission('director/admin')) { + if ($this->hasPermission(Permission::ADMIN)) { $links[] = $this->createDownloadJsonLink(); } - if ($this->hasPermission('director/showsql')) { + if ($this->hasPermission(Permission::SHOW_SQL)) { $links[] = $this->createShowSqlToggle(); } -- cgit v1.2.3