Skip to content
Permalink
Browse files

Fix permission check causing fatal error on dashboard [#14707] (#14710)

  • Loading branch information...
Mark-H authored and opengeek committed Sep 2, 2019
1 parent 0a9393d commit afe80a3637c0a8b86cfa8abf443802bf41829922
@@ -38,6 +38,7 @@ public function render()
}
$this->modx->getService('smarty', modSmarty::class);
$this->modx->smarty->assign('data', $data);
$this->modx->smarty->assign('can_view_logs', $this->modx->hasPermission('logs'));
return $this->modx->smarty->fetch('dashboard/onlineusers.tpl');
}
@@ -41,6 +41,7 @@ public function render()
}
$this->modx->getService('smarty', modSmarty::class);
$this->modx->smarty->assign('data', $data);
$this->modx->smarty->assign('can_view_logs', $this->modx->hasPermission('logs'));
return $this->modx->smarty->fetch('dashboard/recentlyeditedresources.tpl');
}
@@ -40,7 +40,7 @@
{else}
<div class="no-results">{$_lang.w_no_data}</div>
{/if}
{if $modx->hasPermission('logs')}
{if $can_view_logs}
<div class="widget-footer">
<a href="{$_config.manager_url}?a=system/logs">{$_lang.w_view_all} &rarr;</a>
</div>
@@ -83,7 +83,7 @@
{else}
<div class="no-results">{$_lang.w_no_data}</div>
{/if}
{if $modx->hasPermission('logs')}
{if $can_view_logs}
<div class="widget-footer">
<a href="{$_config.manager_url}?a=system/logs">{$_lang.w_view_all} &rarr;</a>
</div>

0 comments on commit afe80a3

Please sign in to comment.
You can’t perform that action at this time.