From 3acae9fff563b780376c2dd74dd273b052d6f864 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Sat, 20 Jun 2009 14:37:42 +0000 Subject: [PATCH] * Remove "shortcut" in Title::userCanRead, it prevents $wgRevokePermissions and extensions not using the userCan hook from restricting read access on the wiki if anon reading is allowed. --- RELEASE-NOTES | 2 ++ includes/Title.php | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5ef87d15d4..67badd74de 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -195,6 +195,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 17014) Blocked users can no longer use Special:UserRights unless they can add/remove *all* groups (have 'userrights' permission). * (bug 19294) Always show Sp-contributions-footer(-anon) +* Attempts to restrict reading of pages while anonymous viewing is allowed + via extensions not using the userCan hook and via $wgRevokePermissions now work. == API changes in 1.16 == diff --git a/includes/Title.php b/includes/Title.php index 9245752203..dd299c842b 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1490,10 +1490,6 @@ class Title { return $result; } - # Shortcut for public wikis, allows skipping quite a bit of code - if ( !empty( $wgGroupPermissions['*']['read'] ) ) - return true; - if( $wgUser->isAllowed( 'read' ) ) { return true; } else { -- 2.20.1