From e82198b8ad000a027be1a1c243be83b0fc0fe92e Mon Sep 17 00:00:00 2001 From: Sam Georges Date: Sun, 9 Nov 2014 14:04:53 +1100 Subject: [PATCH] Refs #729 - Hide updates from system report widget when permissions [system.manage_updates] are denied --- modules/system/reportwidgets/Status.php | 1 + .../reportwidgets/status/partials/_widget.htm | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/system/reportwidgets/Status.php b/modules/system/reportwidgets/Status.php index c6fa87f31..52dd571cf 100644 --- a/modules/system/reportwidgets/Status.php +++ b/modules/system/reportwidgets/Status.php @@ -44,6 +44,7 @@ class Status extends ReportWidgetBase protected function loadData() { $manager = UpdateManager::instance(); + $this->vars['showUpdates'] = $this->controller->user->hasAccess('system.manage_updates'); $this->vars['updates'] = $manager->check(); } } diff --git a/modules/system/reportwidgets/status/partials/_widget.htm b/modules/system/reportwidgets/status/partials/_widget.htm index 2d97be002..b7f40dbff 100644 --- a/modules/system/reportwidgets/status/partials/_widget.htm +++ b/modules/system/reportwidgets/status/partials/_widget.htm @@ -7,12 +7,14 @@ -
  • - - - - -
  • + +
  • + + + + +
  • +