diff options
author | Simon Rettberg | 2018-03-28 14:29:47 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-03-28 14:29:47 +0200 |
commit | 9a70136f17624d4ba52f5eaf233a8d50836ad4f9 (patch) | |
tree | 3ed7533f6a98d0854139ff83503b86c67f192469 | |
parent | [sysconfig] Add api call to rebuild all config.tgz (diff) | |
download | slx-admin-9a70136f17624d4ba52f5eaf233a8d50836ad4f9.tar.gz slx-admin-9a70136f17624d4ba52f5eaf233a8d50836ad4f9.tar.xz slx-admin-9a70136f17624d4ba52f5eaf233a8d50836ad4f9.zip |
[dozmod] Hide expired image hint on main page if no permission
Refs #3332
-rw-r--r-- | modules-available/dozmod/hooks/main-warning.inc.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/modules-available/dozmod/hooks/main-warning.inc.php b/modules-available/dozmod/hooks/main-warning.inc.php index ffa87692..1778bb9d 100644 --- a/modules-available/dozmod/hooks/main-warning.inc.php +++ b/modules-available/dozmod/hooks/main-warning.inc.php @@ -4,8 +4,10 @@ * Show notification in main window if there are images that should be deleted and are waiting for confirmation */ -$res = Database::queryFirst("SELECT Count(*) AS cnt FROM sat.imageversion WHERE deletestate = 'SHOULD_DELETE'", array(), true); -if (isset($res['cnt']) && $res['cnt'] > 0) { - Message::addInfo('dozmod.images-pending-delete-exist', true, $res['cnt']); -} -unset($res); +if (User::hasPermission('.dozmod.expiredimages.delete')) { + $res = Database::queryFirst("SELECT Count(*) AS cnt FROM sat.imageversion WHERE deletestate = 'SHOULD_DELETE'", array(), true); + if (isset($res['cnt']) && $res['cnt'] > 0) { + Message::addInfo('dozmod.images-pending-delete-exist', true, $res['cnt']); + } + unset($res); +}
\ No newline at end of file |