Skip to content

Commit

Permalink
Fix retrieval of the effective user groups
Browse files Browse the repository at this point in the history
Restores compatibility with MediaWiki 1.27+. Patch provided by user
Javawookie (https://phabricator.wikimedia.org/p/Javawookie/)

Bug: T137051
Change-Id: Ia19982f764c53395c7fb32d12d7aab669bbbeef4
  • Loading branch information
kghbln authored and Daniel Kinzler committed Aug 6, 2016
1 parent 9a85128 commit 0d8aa13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lockdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
function lockdownUserPermissionsErrors( $title, $user, $action, &$result ) {
global $wgNamespacePermissionLockdown, $wgSpecialPageLockdown, $wgWhitelistRead, $wgLang;

$ugroups = $user->getEffectiveGroups( true );

$result = null;

// don't impose extra restrictions on UI pages
Expand Down Expand Up @@ -106,8 +108,6 @@ function lockdownUserPermissionsErrors( $title, $user, $action, &$result ) {
return false;
}

$ugroups = $user->getEffectiveGroups( true );;

$match = array_intersect( $ugroups, $groups );

if ( $match ) {
Expand Down

0 comments on commit 0d8aa13

Please sign in to comment.