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
),
'dependencies' => array(
'oojs-ui',
- 'mediawiki.user',
'mediawiki.Upload',
'mediawiki.jqueryMsg',
),
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 */