From: Ryan Schmidt Date: Sat, 20 Jun 2009 14:37:42 +0000 (+0000) Subject: * Remove "shortcut" in Title::userCanRead, it prevents $wgRevokePermissions and exten... X-Git-Tag: 1.31.0-rc.0~41274 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=3acae9fff563b780376c2dd74dd273b052d6f864;p=lhc%2Fweb%2Fwiklou.git * 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. --- 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 {