(Bug 26458) Section edit links appear on pages that user does not have right to edit (
authorPlatonides <platonides@users.mediawiki.org>
Wed, 29 Dec 2010 16:42:46 +0000 (16:42 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Wed, 29 Dec 2010 16:42:46 +0000 (16:42 +0000)
includes/Article.php

index 5a56777..8332cf2 100644 (file)
@@ -1478,7 +1478,7 @@ class Article {
                $parserOptions->setIsPrintable( $wgOut->isPrintable() );
 
                # Don't show section-edit links on old revisions... this way lies madness.
-               if ( !$this->isCurrent() || $wgOut->isPrintable() ) {
+               if ( !$this->isCurrent() || $wgOut->isPrintable() || !$this->mTitle->quickUserCan( 'edit' ) ) {
                        $parserOptions->setEditSection( false );
                }