Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -227,7 +227,6 @@ |
228 | 228 | case 6: $content .= $this->renderBucket6( $record ); break; |
229 | 229 | default: $content .= $this->renderNoBucket( $record ); break; |
230 | 230 | } |
231 | | - # TODO: check roles to determine what to show here (and cache somewhere so we don't keep looking them up). |
232 | 231 | $can_flag = !$this->access[ 'blocked' ]; |
233 | 232 | $can_vote = !$this->access[ 'blocked' ]; |
234 | 233 | $can_hide = $this->access[ 'rollbackers' ]; |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5Utils.php |
— | — | @@ -193,15 +193,15 @@ |
194 | 194 | |
195 | 195 | public function initializeAccess() { |
196 | 196 | global $wgUser; |
197 | | - return array( |
198 | | - 'blocked' => $wgUser->isBlocked(), |
199 | | - 'anon' => $wgUser->isAnon(), |
200 | | - 'registered' => !$wgUser->isAnon() && !$wgUser->isBlocked(), |
201 | | - 'autoconfirmed' => in_array('autoconfirmed', $wgUser->getEffectiveGroups()), |
202 | | - 'rollbackers' => in_array('rollbacker', $wgUser->getEffectiveGroups()), |
203 | | - 'admins' => in_array('sysop', $wgUser->getEffectiveGroups()), |
204 | | - 'oversight' => in_array('oversight', $wgUser->getEffectiveGroups()) |
205 | | - ); |
| 197 | + return array( |
| 198 | + 'blocked' => $wgUser->isBlocked(), |
| 199 | + 'anon' => $wgUser->isAnon(), |
| 200 | + 'registered' => !$wgUser->isAnon() && !$wgUser->isBlocked(), |
| 201 | + 'autoconfirmed' => in_array('autoconfirmed', $wgUser->getEffectiveGroups()), |
| 202 | + 'rollbackers' => in_array('rollbacker', $wgUser->getEffectiveGroups()), |
| 203 | + 'admins' => in_array('sysop', $wgUser->getEffectiveGroups()), |
| 204 | + 'oversight' => in_array('oversight', $wgUser->getEffectiveGroups()) |
| 205 | + ); |
206 | 206 | } |
207 | 207 | } |
208 | 208 | |