r102679 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102678‎ | r102679 | r102680 >
Date:20:09, 10 November 2011
Author:yaron
Status:deferred
Tags:
Comment:
Follow-up to r100705 - changed permission-checking to not be called on basic Special:EditSchema page
Modified paths:
  • /trunk/extensions/PageSchemas/specials/PS_EditSchema.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PageSchemas/specials/PS_EditSchema.php
@@ -459,9 +459,10 @@
460460 function execute( $category ) {
461461 global $wgRequest, $wgOut, $wgUser, $wgTitle;
462462
463 - // Only display this page if user is allowed to edit the
464 - // category page.
465 - if ( !$wgUser->isAllowed( 'edit' ) || !$wgTitle->userCan( 'edit' ) ) {
 463+ // If a category has been selected (i.e., it's not just
 464+ // Special:EditSchema), only display this if the user is
 465+ // allowed to edit the category page.
 466+ if ( !is_null( $category ) && ( !$wgUser->isAllowed( 'edit' ) || !$wgTitle->userCan( 'edit' ) ) ) {
466467 $wgOut->permissionRequired( 'edit' );
467468 return;
468469 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100705Changed "edit schema" tab and page to only be displayed if user can edit the ...yaron16:08, 25 October 2011

Status & tagging log