Index: trunk/extensions/SimpleSecurity/SimpleSecurity_body.php |
— | — | @@ -26,10 +26,6 @@ |
27 | 27 | $wgRestrictionTypes, $wgRestrictionLevels, $wgGroupPermissions, |
28 | 28 | $wgSecurityRenderInfo, $wgSecurityAllowUnreadableLinks, $wgSecurityGroupsArticle; |
29 | 29 | |
30 | | - # $wgGroupPermissions has to have its default read entry removed because Title::userCanRead checks it directly |
31 | | - if ( $this->default_read = ( isset( $wgGroupPermissions['*']['read'] ) && $wgGroupPermissions['*']['read'] ) ) |
32 | | - $wgGroupPermissions['*']['read'] = false; |
33 | | - |
34 | 30 | # Add our hooks |
35 | 31 | $wgHooks['UserGetRights'][] = $this; |
36 | 32 | $wgHooks['ImgAuthBeforeStream'][] = $this; |
— | — | @@ -170,14 +166,8 @@ |
171 | 167 | * Check if image is accessible by current user when using img_auth |
172 | 168 | */ |
173 | 169 | public function onImgAuthBeforeStream( &$title, &$path, &$name, &$result ) { |
174 | | - global $wgUser, $wgGroupPermissions; |
| 170 | + global $wgUser; |
175 | 171 | |
176 | | - # Put the anon read right back in $wgGroupPermissions if it was there initially |
177 | | - # - it had to be removed because Title::userCanRead short-circuits with it |
178 | | - if ( $this->default_read ) { |
179 | | - $wgGroupPermissions['*']['read'] = true; |
180 | | - } |
181 | | - |
182 | 172 | if ( !$this->userCanReadTitle( $wgUser, $title, $error )) { |
183 | 173 | $result = array('img-auth-accessdenied', 'img-auth-noread', $name); |
184 | 174 | return false; |
Index: trunk/extensions/SimpleSecurity/SimpleSecurity.php |
— | — | @@ -22,7 +22,7 @@ |
23 | 23 | * @copyright © 2007-2011 Aran Dunkley |
24 | 24 | * @license GNU General Public Licence 2.0 or later |
25 | 25 | */ |
26 | | -define( 'SIMPLESECURITY_VERSION', '5.0.1, 2011-06-25' ); |
| 26 | +define( 'SIMPLESECURITY_VERSION', '5.0.3, 2011-06-28' ); |
27 | 27 | |
28 | 28 | # Load the SimpleSecurity class and messages |
29 | 29 | $dir = dirname( __FILE__ ) . '/'; |