if( !$user->isAllowed( 'move' ) ) {
// User can't move anything
- $errors[] = array ('movenotallowed');
+ global $wgGroupPermissions;
+ if( $user->isAnon() && ( $wgGroupPermissions['user']['move']
+ || $wgGroupPermissions['autoconfirmed']['move'] ) ) {
+ // custom message if logged-in users without any special rights can move
+ $errors[] = array ( 'movenologintext' );
+ } else {
+ $errors[] = array ('movenotallowed');
+ }
}
} elseif ( $action == 'create' ) {
if( ( $this->isTalkPage() && !$user->isAllowed( 'createtalk' ) ) ||
}
# Check permissions
+ global $wgGroupPermissions;
if( !$wgUser->isAllowed( 'upload' ) ) {
- $wgOut->permissionRequired( 'upload' );
+ if( !$wgUser->isLoggedIn() && ( $wgGroupPermissions['user']['upload']
+ || $wgGroupPermissions['autoconfirmed']['upload'] ) ) {
+ // Custom message if logged-in users without any special rights can upload
+ $wgOut->showErrorPage( 'uploadnologin', 'uploadnologintext' );
+ } else {
+ $wgOut->permissionRequired( 'upload' );
+ }
return;
}
'uploadbtn' => 'Upload file',
'reupload' => 'Re-upload',
'reuploaddesc' => 'Cancel upload and return to the upload form',
+'uploadnologin' => 'Not logged in',
+'uploadnologintext' => 'You must be [[Special:UserLogin|logged in]] to upload files.',
'upload_directory_missing' => 'The upload directory ($1) is missing and could not be created by the webserver.',
'upload_directory_read_only' => 'The upload directory ($1) is not writable by the webserver.',
'uploaderror' => 'Upload error',
In those cases, you will have to move or merge the page manually if desired.",
'movearticle' => 'Move page:',
+'movenologin' => 'Not logged in',
+'movenologintext' => 'You must be a registered user and [[Special:UserLogin|logged in]] to move a page.',
'movenotallowed' => 'You do not have permission to move pages.',
'movenotallowedfile' => 'You do not have permission to move files.',
'cant-move-user-page' => 'You do not have permission to move user pages (apart from subpages).',