Index: trunk/extensions/OpenStackManager/OpenStackNovaProject.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | |
29 | 29 | wfSuppressWarnings(); |
30 | 30 | $result = ldap_search( $wgAuth->ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, |
31 | | - '(&(cn=' . $this->projectname . ')(projectManager=*))' ); |
| 31 | + '(&(cn=' . $this->projectname . ')(owner=*))' ); |
32 | 32 | $this->projectInfo = ldap_get_entries( $wgAuth->ldapconn, $result ); |
33 | 33 | wfRestoreWarnings(); |
34 | 34 | $this->projectDN = $this->projectInfo[0]['dn']; |
— | — | @@ -126,7 +126,7 @@ |
127 | 127 | |
128 | 128 | $projects = array(); |
129 | 129 | wfSuppressWarnings(); |
130 | | - $result = ldap_search( $wgAuth->ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, '(projectManager=*)' ); |
| 130 | + $result = ldap_search( $wgAuth->ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, '(owner=*)' ); |
131 | 131 | wfRestoreWarnings(); |
132 | 132 | if ( $result ) { |
133 | 133 | wfSuppressWarnings(); |
— | — | @@ -153,11 +153,10 @@ |
154 | 154 | $wgAuth->connect(); |
155 | 155 | $wgAuth->bindAs( $wgOpenStackManagerLDAPUser, $wgOpenStackManagerLDAPUserPassword ); |
156 | 156 | |
157 | | - $project['objectclass'][] = 'novaproject'; |
158 | 157 | $project['objectclass'][] = 'groupofnames'; |
159 | 158 | $project['objectclass'][] = 'posixgroup'; |
160 | 159 | $project['cn'] = $projectname; |
161 | | - $project['projectmanager'] = $wgOpenStackManagerLDAPUser; |
| 160 | + $project['owner'] = $wgOpenStackManagerLDAPUser; |
162 | 161 | $project['gidnumber'] = OpenStackNovaUser::getNextIdNumber( $wgAuth, 'gidnumber' ); |
163 | 162 | $dn = 'cn=' . $projectname . ',' . $wgOpenStackManagerLDAPProjectBaseDN; |
164 | 163 | |
— | — | @@ -215,7 +214,7 @@ |
216 | 215 | $wgAuth->connect( $wgOpenStackManagerLDAPDomain ); |
217 | 216 | $wgAuth->bindAs( $wgOpenStackManagerLDAPUser, $wgOpenStackManagerLDAPUserPassword ); |
218 | 217 | |
219 | | - $result = ldap_search( $wgAuth->ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, 'projectmanager=*' ); |
| 218 | + $result = ldap_search( $wgAuth->ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, 'owner=*' ); |
220 | 219 | $entries = ldap_get_entries( $wgAuth->ldapconn, $result ); |
221 | 220 | if ( $entries ) { |
222 | 221 | array_shift($entries); |
Index: trunk/extensions/OpenStackManager/OpenStackNovaUser.php |
— | — | @@ -58,8 +58,8 @@ |
59 | 59 | } |
60 | 60 | |
61 | 61 | function isAdmin() { |
62 | | - if ( isset( $this->userInfo[0]['isadmin'] ) ) { |
63 | | - $isAdmin = $this->userInfo[0]['isadmin'][0]; |
| 62 | + if ( isset( $this->userInfo[0]['isnovaadmin'] ) ) { |
| 63 | + $isAdmin = $this->userInfo[0]['isnovaadmin'][0]; |
64 | 64 | if ( strtolower( $isAdmin ) == "true" ) { |
65 | 65 | return true; |
66 | 66 | } |
— | — | @@ -82,10 +82,10 @@ |
83 | 83 | |
84 | 84 | $this->connect(); |
85 | 85 | |
86 | | - # All projects have a projectManager attribute, project |
| 86 | + # All projects have a owner attribute, project |
87 | 87 | # roles do not |
88 | 88 | $projects = array(); |
89 | | - $filter = "(&(projectManager=*)(member=$this->userDN))"; |
| 89 | + $filter = "(&(owner=*)(member=$this->userDN))"; |
90 | 90 | wfSuppressWarnings(); |
91 | 91 | $result = ldap_search( $wgAuth->ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, $filter ); |
92 | 92 | wfRestoreWarnings(); |
— | — | @@ -280,7 +280,7 @@ |
281 | 281 | $values['objectclass'][] = 'shadowaccount'; |
282 | 282 | $values['accesskey'] = OpenStackNovaUser::uuid4(); |
283 | 283 | $values['secretkey'] = OpenStackNovaUser::uuid4(); |
284 | | - $values['isadmin'] = 'FALSE'; |
| 284 | + $values['isnovaadmin'] = 'FALSE'; |
285 | 285 | $uidnumber = OpenStackNovaUser::getNextIdNumber( $auth, 'uidnumber' ); |
286 | 286 | if ( ! $uidnumber ) { |
287 | 287 | $result = false; |