Last modified: 2006-05-19 16:06:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T8021, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6021 - "Upload file" link is shown even when a user is not authorized to upload
"Upload file" link is shown even when a user is not authorized to upload
Status: RESOLVED DUPLICATE of bug 3556
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: Normal trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-19 12:47 UTC by Rotem Liss
Modified: 2006-05-19 16:06 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Rotem Liss 2006-05-19 12:47:19 UTC
Until April 24th 2005, the "upload file" link was not shown for anonymous users.
On that date, eloquence has changed this behavior, with the following explanation:

"Enable upload navigation link for non-logged-in users. From a usability
perspective, navigation should not be surprising with random elements
popping up under certain circumstances only ("How do I upload" is a FAQ).
Special:Upload will show a message "You have to be logged in" for anonymous
users, so no confusion should arise."

However, it is very normal to hide elements for anonymous users and to show them
for registered users, and so we do about minor edits, watching pages, moving
them, etc. Also, the error for anonymous users is easy to understand ("You must
be logged in to upload files."), but the error for registered users when
restricting the uploads is not so easy to understand ("The action you have
requested is limited to users with the "upload" permission assigned. See
Wiki:Administrators."). I think that like we show all the other elements for
registered users only (actually, for authorized users only, if we change the
permissions), we should also show this one for authorized users only.

The solution is very simple – changing:

if( $wgEnableUploads ) {

in SkinTemplate::buildNavUrls (includes/SkinTemplate.php) to:

if( $wgEnableUploads && $wgUser->isAllowed( 'upload' ) ) {

will do.
Comment 2 Brion Vibber 2006-05-19 16:06:45 UTC

*** This bug has been marked as a duplicate of 3556 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links