From: Alex Z Date: Sat, 26 Dec 2009 21:56:05 +0000 (+0000) Subject: Per CR on r58079, add a permission check for 'reupload-shared' to X-Git-Tag: 1.31.0-rc.0~38471 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=23e5963203e71863de48af94cbea9cdf25d62aa2;p=lhc%2Fweb%2Fwiklou.git Per CR on r58079, add a permission check for 'reupload-shared' to Title::isValidMoveOperation when moving a file over one on a shared repo --- diff --git a/includes/Title.php b/includes/Title.php index 4efd6d1ed4..89b01f4230 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2686,7 +2686,10 @@ class Title { if( !File::checkExtensionCompatibility( $file, $nt->getDBkey() ) ) { $errors[] = array('imagetypemismatch'); } + } elseif( !$wgUser->isAllowed( 'reupload-shared' ) && wfFindFile( $nt ) ) { + $errors[] = array( 'file-exists-sharedrepo' ); } + } if ( $auth ) {