Prevent blocked users from using delete and undelete
This commit is contained in:
parent
5918863f44
commit
9b8c2adb26
3 changed files with 9 additions and 3 deletions
|
|
@ -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
|
which are not of known image types. This is in response to
|
||||||
http://en.wikipedia.org/wiki/Windows_Metafile_vulnerability
|
http://en.wikipedia.org/wiki/Windows_Metafile_vulnerability
|
||||||
* (bug 4507) Adjust FULLPAGENAMEE escaping to standard form
|
* (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 ===
|
=== Caveats ===
|
||||||
|
|
|
||||||
|
|
@ -1686,10 +1686,16 @@ class Article {
|
||||||
# This code desperately needs to be totally rewritten
|
# This code desperately needs to be totally rewritten
|
||||||
|
|
||||||
# Check permissions
|
# Check permissions
|
||||||
if( ( !$wgUser->isAllowed( 'delete' ) ) ) {
|
if( $wgUser->isAllowed( 'delete' ) ) {
|
||||||
|
if( $wgUser->isBlocked() ) {
|
||||||
|
$wgOut->blockedPage();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
$wgOut->sysopRequired();
|
$wgOut->sysopRequired();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( wfReadOnly() ) {
|
if( wfReadOnly() ) {
|
||||||
$wgOut->readOnlyPage();
|
$wgOut->readOnlyPage();
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,7 @@ class UndeleteForm {
|
||||||
if( $par != "" ) {
|
if( $par != "" ) {
|
||||||
$this->mTarget = $par;
|
$this->mTarget = $par;
|
||||||
}
|
}
|
||||||
if ( $wgUser->isAllowed( 'delete' ) ) {
|
if ( $wgUser->isAllowed( 'delete' ) && !$wgUser->isBlocked() ) {
|
||||||
$this->mAllowed = true;
|
$this->mAllowed = true;
|
||||||
} else {
|
} else {
|
||||||
$this->mAllowed = false;
|
$this->mAllowed = false;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue