Prevent blocked users from using delete and undelete

This commit is contained in:
Rob Church 2006-01-06 23:21:38 +00:00
parent 5918863f44
commit 9b8c2adb26
3 changed files with 9 additions and 3 deletions

View file

@ -411,7 +411,7 @@ fully support the editing toolbar, but was found to be too confusing.
which are not of known image types. This is in response to
http://en.wikipedia.org/wiki/Windows_Metafile_vulnerability
* (bug 4507) Adjust FULLPAGENAMEE escaping to standard form
* Disallow users to use rollback when blocked
* Blocked users can no longer use rollback, or delete/undelete pages
=== Caveats ===

View file

@ -1686,10 +1686,16 @@ class Article {
# This code desperately needs to be totally rewritten
# Check permissions
if( ( !$wgUser->isAllowed( 'delete' ) ) ) {
if( $wgUser->isAllowed( 'delete' ) ) {
if( $wgUser->isBlocked() ) {
$wgOut->blockedPage();
return;
}
} else {
$wgOut->sysopRequired();
return;
}
if( wfReadOnly() ) {
$wgOut->readOnlyPage();
return;

View file

@ -319,7 +319,7 @@ class UndeleteForm {
if( $par != "" ) {
$this->mTarget = $par;
}
if ( $wgUser->isAllowed( 'delete' ) ) {
if ( $wgUser->isAllowed( 'delete' ) && !$wgUser->isBlocked() ) {
$this->mAllowed = true;
} else {
$this->mAllowed = false;