Last modified: 2010-05-15 14:35:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T7282, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 5282 - All logged in users can patrol edits if $wgOnlySysopsCanPatrol is unset/false
All logged in users can patrol edits if $wgOnlySysopsCanPatrol is unset/false
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.6.x
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://codex.gallery2.org/
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-18 02:11 UTC by Alan Harder
Modified: 2010-05-15 14:35 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
cvs patch to fix checking of patrol user right (5.48 KB, patch)
2006-03-18 02:13 UTC, Alan Harder
Details

Description Alan Harder 2006-03-18 02:11:52 UTC
In 1.5.7 and current CVS it appears that $wgOnlySysopsCanPatrol is not defined
anywhere by default.  Also, the logic in the places that determine if the user
can patrol doesn't seem to work as intended:
  $wgUser->isAllowed('patrol') || !$wgOnlySysopsCanPatrol
This expression is always true if $wgOnlySysopsCanPatrol is unset/false.. thus
the remaining part of the "if" expression (not shown here) controls whether a
user can patrol, and isAllowed('patrol') has no effect.. end result: all logged
in users can patrol.
Also, one place in DifferenceEngine.php checks rollback right instead of patrol.

* MediaWiki: 1.5.7
* PHP: 4.4.2-1 (apache2handler)
* MySQL: 4.1.15-Debian_1-log

See attached patch for our fix (patch for CVS).. with the setting in
$wgGroupPermissions I didn't see the need for this global, so I removed it. 
Also didn't see a need for the extra isLoggedIn check each time.. just checking
isAllowed seems sufficient.
Without this global I didn't know what to put for the 3rd parameter to
MarkPatrolled and MarkPatrolledComplete hooks, so I changed those to false.
Comment 1 Alan Harder 2006-03-18 02:13:31 UTC
Created attachment 1452 [details]
cvs patch to fix checking of patrol user right
Comment 2 Rob Church 2006-03-18 16:07:34 UTC
Incorporated into CVS HEAD. Thanks for the patch.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links