"Catrope" changed the status of MediaWiki.r109582 to "fixme" and commented it.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/109582#c30265
Old Status: new
> New Status: fixme
Commit summary for MediaWiki.r109582:
AFT5 - Add permissions/roll checks to AFT5 feedback page and API calls.
Requirements call for additional permissions on features that don't exist yet,
which is why there are more roles than we seem to need.
Catrope's comment:
<pre>
+ 'autoconfirmed' => in_array('autoconfirmed',
$wgUser->getEffectiveGroups()),
+ 'rollbackers' => in_array('rollbacker',
$wgUser->getEffectiveGroups()),
+ 'admins' => in_array('sysop',
$wgUser->getEffectiveGroups()),
+ 'oversight' => in_array('oversight',
$wgUser->getEffectiveGroups())
</pre>
Please don't hardcode group names like this, use rights instead, like this:
<pre>
// Check if the user has a given right
if ( $wgUser->isAllowed( 'articlefeedbackv5-viewdeletedfeedback' ) ) { ... }
// Add this to ArticleFeedbackv5.php to add the right
$wgAvailableRights[] = 'articlefeedbackv5-viewdeletedfeedback';
// Add an i18n message describing the right in ArticleFeedbackv5.i18n.php
'right-articlefeedbackv5-viewdeletedfeedback' => 'View deleted ArticleFeedback
comments',
// To assign the right to a group, put this in LocalSettings.php:
$wgGroupPermissions['sysop']['articlefeedbackv5-viewdeletedfeedback'] = true;
</pre>
OK otherwise.
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview