r114726 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114725‎ | r114726 | r114727 >
Date:00:12, 5 April 2012
Author:laner
Status:deferred
Tags:
Comment:
* Fixing global role search
* Adding in a missing message
Modified paths:
  • /trunk/extensions/OpenStackManager/OpenStackManager.i18n.php (modified) (history)
  • /trunk/extensions/OpenStackManager/OpenStackNovaUser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenStackManager/OpenStackManager.i18n.php
@@ -194,6 +194,7 @@
195195 'openstackmanager-projects' => 'Projects',
196196 'openstackmanager-setprojects' => 'Successfully set the project filter.',
197197 'openstackmanager-setprojectfilter' => 'Please select projects to display using the project filter.',
 198+ 'openstackmanager-toggleproject' => 'Toggle',
198199
199200 'openstackmanager-roles' => 'Roles',
200201 'openstackmanager-rolename' => 'Role name',
Index: trunk/extensions/OpenStackManager/OpenStackNovaUser.php
@@ -250,11 +250,11 @@
251251 if ( $wgOpenStackManagerLDAPGlobalRoles["$role"] ) {
252252 # Check global role
253253 $roledn = $wgOpenStackManagerLDAPGlobalRoles["$role"];
254 - $filter = "(member=$this->userDN)";
255 - $result = LdapAuthenticationPlugin::ldap_search( $wgAuth->ldapconn, $roledn, $filter );
 254+ $filter = "(objectclass=*)";
 255+ $result = LdapAuthenticationPlugin::ldap_read( $wgAuth->ldapconn, $roledn, $filter );
256256 if ( $result ) {
257257 $entries = LdapAuthenticationPlugin::ldap_get_entries( $wgAuth->ldapconn, $result );
258 - return ( (int)$entries['count'] > 0 );
 258+ return ( in_array( $this->userDN, $entries[0]['member'] ) );
259259 }
260260 }
261261 return false;

Status & tagging log