*Don't let blocked users patrol
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 27 Sep 2007 18:20:06 +0000 (18:20 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 27 Sep 2007 18:20:06 +0000 (18:20 +0000)
includes/Article.php

index 756a763..bcb3c62 100644 (file)
@@ -1525,6 +1525,15 @@ class Article {
                        $wgOut->permissionRequired( 'patrol' );
                        return;
                }
+               
+               # Check permissions
+               $permission_errors = $this->mTitle->getUserPermissionsErrors( 'delete', $wgUser );
+
+               if (count($permission_errors)>0)
+               {
+                       $wgOut->showPermissionsErrorPage( $permission_errors );
+                       return;
+               }
 
                # If we haven't been given an rc_id value, we can't do anything
                $rcid = $wgRequest->getVal( 'rcid' );