From: addshore Date: Sat, 5 Oct 2013 14:20:52 +0000 (+0200) Subject: (bug 54980) Remove toolbox UserRights if anon user X-Git-Tag: 1.31.0-rc.0~18596^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=c817d8677cb21dd546fcdb52a05f03ea32f2df86;p=lhc%2Fweb%2Fwiklou.git (bug 54980) Remove toolbox UserRights if anon user Change-Id: Ie489ce327a56cf314c9dc525d6bd3eaa39739260 --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index d968d79573..44cafe9ebf 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -1280,12 +1280,14 @@ class SkinTemplate extends Skin { ); } - $sur = new UserrightsPage; - $sur->setContext( $this->getContext() ); - if ( $sur->userCanExecute( $this->getUser() ) ) { - $nav_urls['userrights'] = array( - 'href' => self::makeSpecialUrlSubpage( 'Userrights', $rootUser ) - ); + if ( !$user->isAnon() ) { + $sur = new UserrightsPage; + $sur->setContext( $this->getContext() ); + if ( $sur->userCanExecute( $this->getUser() ) ) { + $nav_urls['userrights'] = array( + 'href' => self::makeSpecialUrlSubpage( 'Userrights', $rootUser ) + ); + } } }