r50180 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50179‎ | r50180 | r50181 >
Date:14:51, 4 May 2009
Author:catrope
Status:reverted (Comments)
Tags:
Comment:
(bug 18677) Give proper error message when viewing &action=protect without sufficient rights. Patch by Stefano Codari
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1962,6 +1962,16 @@
19631963 * action=protect handler
19641964 */
19651965 public function protect() {
 1966+ global $wgUser, $wgOut;
 1967+
 1968+ # Check permissions
 1969+ $permission_errors = $this->mTitle->getUserPermissionsErrors( 'protect', $wgUser );
 1970+
 1971+ if( count( $permission_errors ) > 0 ) {
 1972+ $wgOut->showPermissionsErrorPage( $permission_errors );
 1973+ return;
 1974+ }
 1975+
19661976 $form = new ProtectionForm( $this );
19671977 $form->execute();
19681978 }
Index: trunk/phase3/RELEASE-NOTES
@@ -111,6 +111,8 @@
112112 * Fixed the circular template inclusion check, was broken when the loop
113113 involved redirects. Without this, infinite recursion within the parser is
114114 possible.
 115+* (bug 18677) Give proper error message when viewing &action=protect without
 116+ sufficient rights
115117
116118
117119 == API changes in 1.16 ==

Follow-up revisions

RevisionCommit summaryAuthorDate
r50420Revert r50180 ("Proper error message on action=protect"): causes bug 18728 ("...catrope09:18, 10 May 2009

Comments

#Comment by Werdna (talk | contribs)   04:39, 10 May 2009

Causes a regression, previously you could see the existing protection options through this interface -- see bug 18728.

#Comment by Catrope (talk | contribs)   09:19, 10 May 2009

Reverted for this reason in r50420

Status & tagging log