Properly check permissions.
[lhc/web/wiklou.git] / includes / UploadFromBase.php
index 0d0dc50..387b13a 100644 (file)
@@ -28,6 +28,11 @@ class UploadFromBase {
                global $wgEnableUploads;
                return $wgEnableUploads;
        }
+       static function isAllowed( User $user ) {
+               if( !$user->isAllowed( 'upload' ) )
+                       return 'upload';
+               return true;
+       }
        
        function __construct( $name ) {
                $this->mDesiredDestName = $name;