Index: trunk/extensions/OpenStackManager/special/SpecialNovaInstance.php |
— | — | @@ -16,10 +16,10 @@ |
17 | 17 | } |
18 | 18 | |
19 | 19 | function execute( $par ) { |
20 | | - global $wgRequest, $wgUser; |
| 20 | + global $wgRequest; |
21 | 21 | global $wgOpenStackManagerNovaAdminKeys; |
22 | 22 | |
23 | | - if ( ! $wgUser->isLoggedIn() ) { |
| 23 | + if ( !$this->getUser()->isLoggedIn() ) { |
24 | 24 | $this->notLoggedIn(); |
25 | 25 | return; |
26 | 26 | } |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaSecurityGroup.php |
— | — | @@ -16,10 +16,10 @@ |
17 | 17 | } |
18 | 18 | |
19 | 19 | function execute( $par ) { |
20 | | - global $wgRequest, $wgUser; |
| 20 | + global $wgRequest; |
21 | 21 | global $wgOpenStackManagerNovaAdminKeys; |
22 | 22 | |
23 | | - if ( !$wgUser->isLoggedIn() ) { |
| 23 | + if ( !$this->getUser()->isLoggedIn() ) { |
24 | 24 | $this->notLoggedIn(); |
25 | 25 | return; |
26 | 26 | } |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaAddress.php |
— | — | @@ -14,10 +14,10 @@ |
15 | 15 | } |
16 | 16 | |
17 | 17 | function execute( $par ) { |
18 | | - global $wgRequest, $wgUser; |
| 18 | + global $wgRequest; |
19 | 19 | global $wgOpenStackManagerNovaAdminKeys; |
20 | 20 | |
21 | | - if ( !$wgUser->isLoggedIn() ) { |
| 21 | + if ( !$this->getUser()->isLoggedIn() ) { |
22 | 22 | $this->notLoggedIn(); |
23 | 23 | return; |
24 | 24 | } |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaProject.php |
— | — | @@ -15,9 +15,9 @@ |
16 | 16 | } |
17 | 17 | |
18 | 18 | function execute( $par ) { |
19 | | - global $wgRequest, $wgUser; |
| 19 | + global $wgRequest; |
20 | 20 | |
21 | | - if ( !$wgUser->isLoggedIn() ) { |
| 21 | + if ( !$this->getUser()->isLoggedIn() ) { |
22 | 22 | $this->notLoggedIn(); |
23 | 23 | return; |
24 | 24 | } |
— | — | @@ -40,10 +40,8 @@ |
41 | 41 | * @return bool |
42 | 42 | */ |
43 | 43 | function createProject() { |
44 | | - global $wgUser; |
45 | | - |
46 | 44 | $this->setHeaders(); |
47 | | - if ( !$this->userCanExecute( $wgUser ) ) { |
| 45 | + if ( !$this->userCanExecute( $this->getUser() ) ) { |
48 | 46 | $this->displayRestrictionError(); |
49 | 47 | return false; |
50 | 48 | } |
— | — | @@ -97,13 +95,12 @@ |
98 | 96 | */ |
99 | 97 | function addMember() { |
100 | 98 | global $wgRequest; |
101 | | - global $wgUser; |
102 | 99 | |
103 | 100 | $this->setHeaders(); |
104 | 101 | $this->getOutput()->setPagetitle( wfMsg( 'openstackmanager-addmember' ) ); |
105 | 102 | |
106 | 103 | $project = $wgRequest->getText( 'projectname' ); |
107 | | - if ( !$this->userCanExecute( $wgUser ) && !$this->userLDAP->inProject( $project ) ) { |
| 104 | + if ( !$this->userCanExecute( $this->getUser() ) && !$this->userLDAP->inProject( $project ) ) { |
108 | 105 | $this->notInProject(); |
109 | 106 | return false; |
110 | 107 | } |
— | — | @@ -140,13 +137,12 @@ |
141 | 138 | */ |
142 | 139 | function deleteMember() { |
143 | 140 | global $wgRequest; |
144 | | - global $wgUser; |
145 | 141 | |
146 | 142 | $this->setHeaders(); |
147 | 143 | $this->getOutput()->setPagetitle( wfMsg( 'openstackmanager-removemember' ) ); |
148 | 144 | |
149 | 145 | $projectname = $wgRequest->getText( 'projectname' ); |
150 | | - if ( !$this->userCanExecute( $wgUser ) && !$this->userLDAP->inProject( $projectname ) ) { |
| 146 | + if ( !$this->userCanExecute( $this->getUser() ) && !$this->userLDAP->inProject( $projectname ) ) { |
151 | 147 | $this->notInProject(); |
152 | 148 | return false; |
153 | 149 | } |
— | — | @@ -189,10 +185,9 @@ |
190 | 186 | */ |
191 | 187 | function deleteProject() { |
192 | 188 | global $wgRequest; |
193 | | - global $wgUser; |
194 | 189 | |
195 | 190 | $this->setHeaders(); |
196 | | - if ( !$this->userCanExecute( $wgUser ) ) { |
| 191 | + if ( !$this->userCanExecute( $this->getUser() ) ) { |
197 | 192 | $this->displayRestrictionError(); |
198 | 193 | return false; |
199 | 194 | } |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaDomain.php |
— | — | @@ -14,10 +14,10 @@ |
15 | 15 | } |
16 | 16 | |
17 | 17 | function execute( $par ) { |
18 | | - global $wgRequest, $wgUser; |
| 18 | + global $wgRequest; |
19 | 19 | global $wgOpenStackManagerLDAPRolesIntersect; |
20 | 20 | |
21 | | - if ( !$wgUser->isLoggedIn() ) { |
| 21 | + if ( !$this->getUser()->isLoggedIn() ) { |
22 | 22 | $this->notLoggedIn(); |
23 | 23 | return; |
24 | 24 | } |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaVolume.php |
— | — | @@ -16,10 +16,10 @@ |
17 | 17 | } |
18 | 18 | |
19 | 19 | function execute( $par ) { |
20 | | - global $wgRequest, $wgUser; |
| 20 | + global $wgRequest; |
21 | 21 | global $wgOpenStackManagerNovaAdminKeys; |
22 | 22 | |
23 | | - if ( !$wgUser->isLoggedIn() ) { |
| 23 | + if ( !$this->getUser()->isLoggedIn() ) { |
24 | 24 | $this->notLoggedIn(); |
25 | 25 | return; |
26 | 26 | } |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaKey.php |
— | — | @@ -13,9 +13,9 @@ |
14 | 14 | } |
15 | 15 | |
16 | 16 | function execute( $par ) { |
17 | | - global $wgRequest, $wgUser; |
| 17 | + global $wgRequest; |
18 | 18 | |
19 | | - if ( !$wgUser->isLoggedIn() ) { |
| 19 | + if ( !$this->getUser()->isLoggedIn() ) { |
20 | 20 | $this->notLoggedIn(); |
21 | 21 | return; |
22 | 22 | } |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaPuppetGroup.php |
— | — | @@ -6,9 +6,9 @@ |
7 | 7 | } |
8 | 8 | |
9 | 9 | function execute( $par ) { |
10 | | - global $wgRequest, $wgUser; |
| 10 | + global $wgRequest; |
11 | 11 | |
12 | | - if ( ! $wgUser->isLoggedIn() ) { |
| 12 | + if ( ! $this->getUser()->isLoggedIn() ) { |
13 | 13 | $this->notLoggedIn(); |
14 | 14 | return; |
15 | 15 | } |
— | — | @@ -40,10 +40,8 @@ |
41 | 41 | * @return bool |
42 | 42 | */ |
43 | 43 | function createPuppetGroup() { |
44 | | - global $wgUser; |
45 | | - |
46 | 44 | $this->setHeaders(); |
47 | | - if ( !$this->userCanExecute( $wgUser ) ) { |
| 45 | + if ( !$this->userCanExecute( $this->getUser() ) ) { |
48 | 46 | $this->displayRestrictionError(); |
49 | 47 | return false; |
50 | 48 | } |
— | — | @@ -84,10 +82,9 @@ |
85 | 83 | */ |
86 | 84 | function addPuppetClass() { |
87 | 85 | global $wgRequest; |
88 | | - global $wgUser; |
89 | 86 | |
90 | 87 | $this->setHeaders(); |
91 | | - if ( !$this->userCanExecute( $wgUser ) ) { |
| 88 | + if ( !$this->userCanExecute( $this->getUser() ) ) { |
92 | 89 | $this->displayRestrictionError(); |
93 | 90 | return false; |
94 | 91 | } |
— | — | @@ -131,10 +128,9 @@ |
132 | 129 | */ |
133 | 130 | function deletePuppetClass() { |
134 | 131 | global $wgRequest; |
135 | | - global $wgUser; |
136 | 132 | |
137 | 133 | $this->setHeaders(); |
138 | | - if ( !$this->userCanExecute( $wgUser ) ) { |
| 134 | + if ( !$this->userCanExecute( $this->getUser() ) ) { |
139 | 135 | $this->displayRestrictionError(); |
140 | 136 | return false; |
141 | 137 | } |
— | — | @@ -169,10 +165,9 @@ |
170 | 166 | */ |
171 | 167 | function addPuppetVar() { |
172 | 168 | global $wgRequest; |
173 | | - global $wgUser; |
174 | 169 | |
175 | 170 | $this->setHeaders(); |
176 | | - if ( !$this->userCanExecute( $wgUser ) ) { |
| 171 | + if ( !$this->userCanExecute( $this->getUser() ) ) { |
177 | 172 | $this->displayRestrictionError(); |
178 | 173 | return false; |
179 | 174 | } |
— | — | @@ -216,10 +211,9 @@ |
217 | 212 | */ |
218 | 213 | function deletePuppetVar() { |
219 | 214 | global $wgRequest; |
220 | | - global $wgUser; |
221 | 215 | |
222 | 216 | $this->setHeaders(); |
223 | | - if ( !$this->userCanExecute( $wgUser ) ) { |
| 217 | + if ( !$this->userCanExecute( $this->getUser() ) ) { |
224 | 218 | $this->displayRestrictionError(); |
225 | 219 | return false; |
226 | 220 | } |
— | — | @@ -255,10 +249,9 @@ |
256 | 250 | */ |
257 | 251 | function deletePuppetGroup() { |
258 | 252 | global $wgRequest; |
259 | | - global $wgUser; |
260 | 253 | |
261 | 254 | $this->setHeaders(); |
262 | | - if ( !$this->userCanExecute( $wgUser ) ) { |
| 255 | + if ( !$this->userCanExecute( $this->getUser() ) ) { |
263 | 256 | $this->displayRestrictionError(); |
264 | 257 | return false; |
265 | 258 | } |
— | — | @@ -293,10 +286,9 @@ |
294 | 287 | */ |
295 | 288 | function modifyPuppetClass() { |
296 | 289 | global $wgRequest; |
297 | | - global $wgUser; |
298 | 290 | |
299 | 291 | $this->setHeaders(); |
300 | | - if ( !$this->userCanExecute( $wgUser ) ) { |
| 292 | + if ( !$this->userCanExecute( $this->getUser() ) ) { |
301 | 293 | $this->displayRestrictionError(); |
302 | 294 | return false; |
303 | 295 | } |
— | — | @@ -350,10 +342,9 @@ |
351 | 343 | */ |
352 | 344 | function modifyPuppetVar() { |
353 | 345 | global $wgRequest; |
354 | | - global $wgUser; |
355 | 346 | |
356 | 347 | $this->setHeaders(); |
357 | | - if ( !$this->userCanExecute( $wgUser ) ) { |
| 348 | + if ( !$this->userCanExecute( $this->getUser() ) ) { |
358 | 349 | $this->displayRestrictionError(); |
359 | 350 | return false; |
360 | 351 | } |
— | — | @@ -407,10 +398,9 @@ |
408 | 399 | */ |
409 | 400 | function modifyPuppetGroup() { |
410 | 401 | global $wgRequest; |
411 | | - global $wgUser; |
412 | 402 | |
413 | 403 | $this->setHeaders(); |
414 | | - if ( !$this->userCanExecute( $wgUser ) ) { |
| 404 | + if ( !$this->userCanExecute( $this->getUser() ) ) { |
415 | 405 | $this->displayRestrictionError(); |
416 | 406 | return false; |
417 | 407 | } |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaRole.php |
— | — | @@ -15,9 +15,9 @@ |
16 | 16 | } |
17 | 17 | |
18 | 18 | function execute( $par ) { |
19 | | - global $wgRequest, $wgUser; |
| 19 | + global $wgRequest; |
20 | 20 | |
21 | | - if ( !$wgUser->isLoggedIn() ) { |
| 21 | + if ( !$this->getUser()->isLoggedIn() ) { |
22 | 22 | $this->notLoggedIn(); |
23 | 23 | return; |
24 | 24 | } |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | * @return bool |
38 | 38 | */ |
39 | 39 | function addMember() { |
40 | | - global $wgRequest, $wgUser; |
| 40 | + global $wgRequest; |
41 | 41 | |
42 | 42 | $this->setHeaders(); |
43 | 43 | $this->getOutput()->setPagetitle( wfMsg( 'openstackmanager-addmember' ) ); |
— | — | @@ -45,7 +45,7 @@ |
46 | 46 | $rolename = $wgRequest->getText( 'rolename' ); |
47 | 47 | $projectname = $wgRequest->getText( 'projectname' ); |
48 | 48 | if ( $projectname ) { |
49 | | - if ( !$this->userCanExecute( $wgUser ) && !$this->userLDAP->inRole( $rolename, $projectname, true ) ) { |
| 49 | + if ( !$this->userCanExecute( $this->getUser() ) && !$this->userLDAP->inRole( $rolename, $projectname, true ) ) { |
50 | 50 | $this->displayRestrictionError(); |
51 | 51 | return false; |
52 | 52 | } |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | 'name' => 'members', |
73 | 73 | ); |
74 | 74 | } else { |
75 | | - if ( !$this->userCanExecute( $wgUser ) ) { |
| 75 | + if ( !$this->userCanExecute( $this->getUser() ) ) { |
76 | 76 | $this->displayRestrictionError(); |
77 | 77 | return false; |
78 | 78 | } |
— | — | @@ -118,7 +118,6 @@ |
119 | 119 | */ |
120 | 120 | function deleteMember() { |
121 | 121 | global $wgRequest; |
122 | | - global $wgUser; |
123 | 122 | |
124 | 123 | $this->setHeaders(); |
125 | 124 | $this->getOutput()->setPagetitle( wfMsg( 'openstackmanager-removerolemember' ) ); |
— | — | @@ -126,7 +125,7 @@ |
127 | 126 | $rolename = $wgRequest->getText( 'rolename' ); |
128 | 127 | $projectname = $wgRequest->getText( 'projectname' ); |
129 | 128 | if ( $projectname ) { |
130 | | - if ( !$this->userCanExecute( $wgUser ) && !$this->userLDAP->inRole( $rolename, $projectname, true ) ) { |
| 129 | + if ( !$this->userCanExecute( $this->getUser() ) && !$this->userLDAP->inRole( $rolename, $projectname, true ) ) { |
131 | 130 | $this->displayRestrictionError(); |
132 | 131 | return false; |
133 | 132 | } |
— | — | @@ -141,7 +140,7 @@ |
142 | 141 | } |
143 | 142 | } |
144 | 143 | } else { |
145 | | - if ( !$this->userCanExecute( $wgUser ) ) { |
| 144 | + if ( !$this->userCanExecute( $this->getUser() ) ) { |
146 | 145 | $this->displayRestrictionError(); |
147 | 146 | return false; |
148 | 147 | } |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaSudoer.php |
— | — | @@ -10,9 +10,9 @@ |
11 | 11 | } |
12 | 12 | |
13 | 13 | function execute( $par ) { |
14 | | - global $wgRequest, $wgUser; |
| 14 | + global $wgRequest; |
15 | 15 | |
16 | | - if ( !$wgUser->isLoggedIn() ) { |
| 16 | + if ( !$this->getUser()->isLoggedIn() ) { |
17 | 17 | $this->notLoggedIn(); |
18 | 18 | return; |
19 | 19 | } |