jenkins-bot has submitted this change and it was merged.

Change subject: (bug 54980) Remove toolbox UserRights if anon user
......................................................................


(bug 54980) Remove toolbox UserRights if anon user

Change-Id: Ie489ce327a56cf314c9dc525d6bd3eaa39739260
---
M includes/SkinTemplate.php
1 file changed, 8 insertions(+), 6 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php
index d968d79..44cafe9 100644
--- a/includes/SkinTemplate.php
+++ b/includes/SkinTemplate.php
@@ -1280,12 +1280,14 @@
                                );
                        }
 
-                       $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 )
+                                       );
+                               }
                        }
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/87672
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie489ce327a56cf314c9dc525d6bd3eaa39739260
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to