r90408 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90407‎ | r90408 | r90409 >
Date:18:07, 19 June 2011
Author:mgrabovsky
Status:resolved (Comments)
Tags:
Comment:
(bug 29342) Patrol preferences shouldn't be visible to users who don't have patrol permissions

Also show 'minordefault' only to those who can 'minoredit'
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/Preferences.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -105,6 +105,8 @@
106106 consecutive edits by same user in included diff, but then linked to
107107 a single ungrouped diff.
108108 * Do not try to group together a page creation and edit in the RSS feed of RC.
 109+* (bug 29342) Patrol preferences shouldn't be visible to users who don't have
 110+ patrol permissions
109111
110112 === API changes in 1.19 ===
111113 * BREAKING CHANGE: action=watch now requires POST and token.
Index: trunk/phase3/includes/Preferences.php
@@ -745,12 +745,15 @@
746746 'section' => 'editing/advancedediting',
747747 'label-message' => 'tog-showtoolbar',
748748 );
749 - $defaultPreferences['minordefault'] = array(
750 - 'type' => 'toggle',
751 - 'section' => 'editing/advancedediting',
752 - 'label-message' => 'tog-minordefault',
753 - );
754749
 750+ if ( $user->isAllowed( 'minoredit' ) ) {
 751+ $defaultPreferences['minordefault'] = array(
 752+ 'type' => 'toggle',
 753+ 'section' => 'editing/advancedediting',
 754+ 'label-message' => 'tog-minordefault',
 755+ );
 756+ }
 757+
755758 if ( $wgUseExternalEditor ) {
756759 $defaultPreferences['externaleditor'] = array(
757760 'type' => 'toggle',
@@ -815,7 +818,7 @@
816819 'section' => 'rc/advancedrc',
817820 );
818821
819 - if ( $wgUseRCPatrol ) {
 822+ if ( $wgUseRCPatrol && $user->isAllowed( 'patrol' ) ) {
820823 $defaultPreferences['hidepatrolled'] = array(
821824 'type' => 'toggle',
822825 'section' => 'rc/advancedrc',

Sign-offs

UserFlagDate
Krinkleinspected00:23, 22 June 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r90763Follow-up r90408: use $user->useRCPatrol()mgrabovsky10:04, 25 June 2011

Comments

#Comment by Aaron Schulz (talk | contribs)   01:02, 25 June 2011

Replace $wgUseRCPatrol && $user->isAllowed( 'patrol' ) with $user->useRCPatrol().

#Comment by Aaron Schulz (talk | contribs)   01:03, 25 June 2011

I meant "Replace $wgUseRCPatrol && $user->isAllowed( 'patrol' ) with $user->useRCPatrol().

Status & tagging log