Skip to content

Commit

Permalink
refs #607 display upload ZIP file link only if user is superUser
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed Oct 1, 2013
1 parent e58b0d1 commit 8335245
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions plugins/CorePluginsAdmin/Controller.php
Expand Up @@ -169,6 +169,7 @@ function extend()
{
$view = $this->configureView('@CorePluginsAdmin/extend');
$view->installNonce = Nonce::getNonce(static::INSTALL_NONCE);
$view->isSuperUser = Piwik::isUserIsSuperUser();

echo $view->render();
}
Expand Down
8 changes: 6 additions & 2 deletions plugins/CorePluginsAdmin/templates/extend.twig
Expand Up @@ -42,7 +42,9 @@

<span class="callToAction">
by <a href="#">writing your own plugin</a>
<br/> or by <a href="#" class="uploadPlugin">uploading a plugin</a>
{% if isSuperUser %}
<br/> or by <a href="#" class="uploadPlugin">uploading a plugin</a>
{% endif %}
</span>

</div>
Expand All @@ -57,7 +59,9 @@

<span class="callToAction">
by <a href="#">design your own theme</a><br />
or by <a href="#" class="uploadPlugin">uploading a theme</a>
{% if isSuperUser %}
or by <a href="#" class="uploadPlugin">uploading a theme</a>
{% endif %}
</span>
</div>
</div>
Expand Down

0 comments on commit 8335245

Please sign in to comment.