Merge "Revert "mediawiki.Upload.BookletLayout: If the user can't upload, don't show...
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 22 Oct 2015 21:31:12 +0000 (21:31 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 22 Oct 2015 21:31:12 +0000 (21:31 +0000)
resources/Resources.php
resources/src/mediawiki/mediawiki.Upload.BookletLayout.js

index 3a6a3b5..59ce155 100644 (file)
@@ -1171,7 +1171,6 @@ return array(
                ),
                'dependencies' => array(
                        'oojs-ui',
-                       'mediawiki.user',
                        'mediawiki.Upload',
                        'mediawiki.jqueryMsg',
                ),
index 0a1121b..dd199ce 100644 (file)
                                content: [ this.insertForm ]
                        } )
                ] );
-
-               // If the user can't upload anything, don't give them the option to
-               // TODO Check the rights on the target wiki rather than current, they might not be the same
-               mw.user.getRights().done( function ( rights ) {
-                       if ( rights.indexOf( 'upload' ) === -1 ) {
-                               this.getPage( 'upload' ).$element
-                                       .empty()
-                                       // TODO Use a better error message when not all logged-in users can upload
-                                       .msg( 'api-error-mustbeloggedin' );
-                       }
-               }.bind( this ) );
        };
 
        /* Setup */