Last modified: 2007-09-10 07:48:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8759 - Disallow rollback when the user is unable to edit the page
Disallow rollback when the user is unable to edit the page
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-24 20:40 UTC by Travis D
Modified: 2007-09-10 07:48 UTC (History)
1 user (show)

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


Attachments

Description Travis D 2007-01-24 20:40:57 UTC
Hi,

I've been able to reproduce this on MW 1.8.3. If your wiki configuration allows
regular users on a wiki to be able to rollback edits, they are able to rollback
edits on protected pages, even though they can't directly edit them. 

I fixed this on our site by changing Article:rollback by adding: 


        if ( ! $this->mTitle->userCanEdit() ) {
            wfDebug( "$fname: user can't edit\n" );
            $wgOut->readOnlyPage( $this->mArticle->getContent(), true );
            wfProfileOut( $fname );
            return;
        }

to the function rollback and changing in DifferenceEngine.php on line 150 from: 

 if ( $this->mNewRev->isCurrent() && $wgUser->isAllowed('rollback') ) {

to

 if ( $this->mNewRev->isCurrent() && $wgUser->isAllowed('rollback') &&
$this->mTitle->userCanEdit()) {
Comment 1 Andrew Garrett 2007-09-10 07:48:58 UTC
Fixed in r25719, with a different patch.

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


Navigation
Links