mirror of
https://github.com/sruupl/batflat.git
synced 2026-02-26 04:50:45 +01:00
Merge pull request #20 from michu2k/master
Required access to the update button
This commit is contained in:
@@ -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'], ['']);
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<a href="#" class="navbar-brand" id="sidebar-toggle"><i class="fa fa-bars"></i></a>
|
||||
</div>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{if: $bat.has_update}
|
||||
{if: $bat.has_update && $bat.update_access}
|
||||
<li class="hidden-sm hidden-xs"><a href="{?= url([ADMIN, 'settings', 'updates']) ?}" class="small"><span class="label label-danger">{$lang.general.update_available}</span></a></li>
|
||||
{/if}
|
||||
<li class="hello hidden-sm hidden-xs"><a href="#"><i class="fa fa-fw fa-user"></i> <span>{?= sprintf($lang.general.hello, $bat.username) ?}</span></a></li>
|
||||
|
||||
Reference in New Issue
Block a user