Index: trunk/extensions/OpenStackManager/OpenStackNovaUser.php |
— | — | @@ -237,11 +237,11 @@ |
238 | 238 | if ( $wgOpenStackManagerLDAPGlobalRoles["$role"] ) { |
239 | 239 | # Check global role |
240 | 240 | $roledn = $wgOpenStackManagerLDAPGlobalRoles["$role"]; |
241 | | - $filter = "(member=$this->userDN)"; |
242 | | - $result = LdapAuthenticationPlugin::ldap_search( $wgAuth->ldapconn, $roledn, $filter ); |
| 241 | + $filter = "(objectclass=*)"; |
| 242 | + $result = LdapAuthenticationPlugin::ldap_read( $wgAuth->ldapconn, $roledn, $filter ); |
243 | 243 | if ( $result ) { |
244 | 244 | $entries = LdapAuthenticationPlugin::ldap_get_entries( $wgAuth->ldapconn, $result ); |
245 | | - return ( (int)$entries['count'] > 0 ); |
| 245 | + return ( in_array( $this->userDN, $entries[0]['member'] ) ); |
246 | 246 | } |
247 | 247 | } |
248 | 248 | return false; |