Last modified: 2011-05-03 19:15:10 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 T30737, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28737 - Do not show "Did you know that you can edit this page?" if user is not allowed to edit current page
Do not show "Did you know that you can edit this page?" if user is not allowe...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
ArticleFeedback (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Krinkle
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-28 18:45 UTC by Raimond Spekking
Modified: 2011-05-03 19:15 UTC (History)
2 users (show)

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


Attachments

Description Raimond Spekking 2011-04-28 18:45:03 UTC
Do not offer 'Did you know that you can edit this page?' when page is protected. Spotted today at http://en.wikipedia.org/wiki/Justin_Bieber as IP.
Comment 1 Trevor Parscal 2011-04-28 18:58:36 UTC
This seems to be because the logic is failing to work properly.

http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js?view=markup#l276
Comment 2 Brion Vibber 2011-04-29 18:34:47 UTC
$.inArray returns an index or -1 if not found -- not a boolean as one apparently expects.
Comment 3 Krinkle 2011-05-01 13:10:02 UTC
Changing bugsummary. The edit-dyk-pitch shouldn't be hidden just because a page is protected, instead only if the user is not allowed to edit the current page (ie. semi- or fullprotection for anonymous/new users, and fullprotection for autoconfirmed users)


I suggest implementing a mw.user.isAllowed-ish function (or mw.user.canEdit() for starters).
Comment 4 Krinkle 2011-05-01 13:19:10 UTC
Should be fixed in r87185.

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


Navigation
Links