* (bug 3280) Respect 'move' group permission on page moves
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 26 Aug 2005 21:40:21 +0000 (21:40 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 26 Aug 2005 21:40:21 +0000 (21:40 +0000)
Note: if you turn *on* moves for anonymous users this will
break the log a bit, since the entries won't join to the
user table by id.

RELEASE-NOTES
includes/SkinTemplate.php
includes/SpecialMovepage.php
includes/Title.php

index 42ba06c..87d6c2d 100644 (file)
@@ -56,6 +56,8 @@ Misc work going on.....
 fully support the editing toolbar, but was found to be too confusing.
 * (bug 2554) Tell users they are uploading too large file
 * (bug 3271) Updated LanguageNn.php for HEAD
+* (bug 3280) Respect 'move' group permission on page moves
+
 
 === Caveats ===
 
index b4dcb45..732d38f 100644 (file)
@@ -623,14 +623,12 @@ class SkinTemplate extends Skin {
                                                'href' => $this->mTitle->getLocalUrl( 'action=delete' )
                                        );
                                }
-                               if ( $wgUser->isLoggedIn() ) {
-                                       if ( $this->mTitle->userCanMove()) {
-                                               $content_actions['move'] = array(
-                                                       'class' => ($this->mTitle->getDbKey() == 'Movepage' and $this->mTitle->getNamespace == NS_SPECIAL) ? 'selected' : false,
-                                                       'text' => wfMsg('move'),
-                                                       'href' => $this->makeSpecialUrl("Movepage/$this->thispage" )
-                                               );
-                                       }
+                               if ( $this->mTitle->userCanMove()) {
+                                       $content_actions['move'] = array(
+                                               'class' => ($this->mTitle->getDbKey() == 'Movepage' and $this->mTitle->getNamespace == NS_SPECIAL) ? 'selected' : false,
+                                               'text' => wfMsg('move'),
+                                               'href' => $this->makeSpecialUrl("Movepage/$this->thispage" )
+                                       );
                                }
                        } else {
                                //article doesn't exist or is deleted
index 58f445c..4d4abaf 100644 (file)
@@ -17,7 +17,7 @@ function wfSpecialMovepage( $par = null ) {
        global $wgUser, $wgOut, $wgRequest, $action, $wgOnlySysopMayMove;
 
        # check rights. We don't want newbies to move pages to prevents possible attack
-       if ( $wgUser->isAnon() or $wgUser->isBlocked() or ($wgOnlySysopMayMove and $wgUser->isNewbie())) {
+       if ( !$wgUser->isAllowed( 'move' ) or $wgUser->isBlocked() or ($wgOnlySysopMayMove and $wgUser->isNewbie())) {
                $wgOut->errorpage( "movenologin", "movenologintext" );
                return;
        }
index b4c681c..090dd90 100644 (file)
@@ -951,7 +951,8 @@ class Title {
                        }
                }
 
-               if( $action == 'move' && !$this->isMovable() ) {
+               if( $action == 'move' &&
+                       !( $this->isMovable() && $wgUser->isAllowed( 'move' ) ) ) {
                        wfProfileOut( $fname );
                        return false;
                }