From aca398a1a00340ab30c5459a3146bd3ef2a8c1e5 Mon Sep 17 00:00:00 2001 From: michu2k Date: Tue, 29 May 2018 02:17:42 +0200 Subject: [PATCH] Required access to the update button --- inc/core/Admin.php | 12 +++++++----- themes/admin/index.html | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/inc/core/Admin.php b/inc/core/Admin.php index d64500b..321ad9b 100644 --- a/inc/core/Admin.php +++ b/inc/core/Admin.php @@ -58,12 +58,14 @@ class Admin extends Main public function drawTheme($file) { $username = $this->getUserInfo('fullname', null, true); + $access = $this->getUserInfo('access'); - $this->assign['username'] = !empty($username) ? $username : $this->getUserInfo('username'); - $this->assign['notify'] = $this->getNotify(); - $this->assign['path'] = url(); - $this->assign['version'] = $this->settings->get('settings.version'); - $this->assign['has_update'] = $this->module ? $this->module->settings->_checkUpdate() : false; + $this->assign['username'] = !empty($username) ? $username : $this->getUserInfo('username'); + $this->assign['notify'] = $this->getNotify(); + $this->assign['path'] = url(); + $this->assign['version'] = $this->settings->get('settings.version'); + $this->assign['has_update'] = $this->module ? $this->module->settings->_checkUpdate() : false; + $this->assign['update_access'] = ($access == 'all') || in_array('settings', explode(',', $access)) ? true : false; $this->assign['header'] = isset_or($this->appends['header'], ['']); $this->assign['footer'] = isset_or($this->appends['footer'], ['']); diff --git a/themes/admin/index.html b/themes/admin/index.html index d7cb515..e73278a 100644 --- a/themes/admin/index.html +++ b/themes/admin/index.html @@ -54,7 +54,7 @@