Even though this happens pretty quickly, the user shouldn't have to select an image and wait for the upload request to find out that they aren not logged in.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T115858 Design improvements for mw.ForeignStructuredUpload.BookletLayout | |||
Resolved | matmarex | T119314 MWMediaDialog: exception "Local uploads are disabled" | |||
Resolved | matmarex | T115866 Show not logged in error before uploading to stash in mw.Upload.BookletLayout | |||
Resolved | matmarex | T117868 Factor out mw.user.getRights()/getGroups() into a mediawiki.api module (so that it can be used with ForeignApi) |
Event Timeline
Here we want to frame it in a positive way ("you need to log-in to upload" ) as opposed to an error ("you forgot to log-in").
I think it makes sense to still keep a "disabled" version of the main entry point that informs about the need to log-in. That should include a clear call to action that allows the user to access the log-in form.
Change 248101 had a related patch set uploaded (by Bartosz Dziewoński):
mediawiki.Upload.BookletLayout: If the user can't upload anything, don't give them the option to
The patch above is a very barebones solution. For VE, it will keep the "Upload" tab, but display a short error message instead of the form.
It doesn't close this task: in addition to this being pretty poor UI, there are at least two problems with it under different MediaWiki configuration (see the commit message). But it'll do the job for now.
Change 248101 merged by jenkins-bot:
mediawiki.Upload.BookletLayout: If the user can't upload, don't show them the form
Change 248246 had a related patch set uploaded (by Bartosz Dziewoński):
Revert "mediawiki.Upload.BookletLayout: If the user can't upload, don't show them the form"
Change 248246 merged by jenkins-bot:
Revert "mediawiki.Upload.BookletLayout: If the user can't upload, don't show them the form"
Probably? We'd have to wait for the ForeignApi to be initialized, then query that to get the scripts paths and stuff for the foreign wiki, then we could make a working link. In Wikimedia config it is sufficient to log in on the local wiki.
Change 257669 had a related patch set uploaded (by Bartosz Dziewoński):
mediawiki.Upload.BookletLayout: If the user can't upload, don't show them the form
Change 257669 merged by jenkins-bot:
mediawiki.Upload.BookletLayout: If the user can't upload, don't show them the form