Index: trunk/extensions/OpenStackManager/OpenStackManager.i18n.php |
— | — | @@ -194,6 +194,7 @@ |
195 | 195 | 'openstackmanager-projects' => 'Projects', |
196 | 196 | 'openstackmanager-setprojects' => 'Successfully set the project filter.', |
197 | 197 | 'openstackmanager-setprojectfilter' => 'Please select projects to display using the project filter.', |
| 198 | + 'openstackmanager-toggleproject' => 'Toggle', |
198 | 199 | |
199 | 200 | 'openstackmanager-roles' => 'Roles', |
200 | 201 | 'openstackmanager-rolename' => 'Role name', |
Index: trunk/extensions/OpenStackManager/OpenStackNovaUser.php |
— | — | @@ -250,11 +250,11 @@ |
251 | 251 | if ( $wgOpenStackManagerLDAPGlobalRoles["$role"] ) { |
252 | 252 | # Check global role |
253 | 253 | $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 ); |
256 | 256 | if ( $result ) { |
257 | 257 | $entries = LdapAuthenticationPlugin::ldap_get_entries( $wgAuth->ldapconn, $result ); |
258 | | - return ( (int)$entries['count'] > 0 ); |
| 258 | + return ( in_array( $this->userDN, $entries[0]['member'] ) ); |
259 | 259 | } |
260 | 260 | } |
261 | 261 | return false; |