} elseif( !$wgUser->isLoggedIn() ) {
$wgOut->showErrorPage( 'uploadnologin', 'uploadnologintext' );
return;
- } elseif( !$this->title->userCan( 'edit' ) ) {
+ } elseif( !$this->title->userCan( 'edit' ) || !$this->title->userCan( 'upload' ) ) {
// The standard read-only thing doesn't make a whole lot of sense
// here; surely it should show the image or something? -- RC
$article = new Article( $this->title );
* If the image is protected, non-sysop users won't be able
* to modify it by uploading a new revision.
*/
- if( !$nt->userCan( 'edit' ) || !$nt->userCan( 'create' ) ) {
+ if( !$nt->userCan( 'edit' ) ||
+ !$nt->userCan( 'create' ) ||
+ !$nt->userCan( 'upload' ) ){
return self::PROTECTED_PAGE;
}
'restriction-edit' => 'Edit',
'restriction-move' => 'Move',
'restriction-create' => 'Create',
+'restriction-upload' => 'Upload',
# Restriction levels
'restriction-level-sysop' => 'full protected',