From: Bartosz DziewoƄski Date: Thu, 22 Oct 2015 21:20:50 +0000 (+0000) Subject: Revert "mediawiki.Upload.BookletLayout: If the user can't upload, don't show them... X-Git-Tag: 1.31.0-rc.0~9290^2 X-Git-Url: http://git.cyclocoop.org//%27http:/code.google.com/p/ie7-js//%27?a=commitdiff_plain;h=68ce6ac758f9bba2daab1dbc78819881c5a5addb;p=lhc%2Fweb%2Fwiklou.git Revert "mediawiki.Upload.BookletLayout: If the user can't upload, don't show them the form" This actually won't work for Wikimedia wikis, turns out that many of them disabled local uploads. This reverts commit 29edb68446b5b6faa4b5038698f042ef25e4425d. Bug: T115866 Change-Id: Ib28539f2ff22cdbf1d80b1b601e7855c1110ad40 --- diff --git a/resources/Resources.php b/resources/Resources.php index 3a6a3b56bc..59ce155497 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1171,7 +1171,6 @@ return array( ), 'dependencies' => array( 'oojs-ui', - 'mediawiki.user', 'mediawiki.Upload', 'mediawiki.jqueryMsg', ), diff --git a/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js b/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js index 0a1121b651..dd199ceff7 100644 --- a/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js +++ b/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js @@ -88,17 +88,6 @@ 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 */