Last modified: 2010-05-15 15:54:49 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 T16167, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14167 - userCanRead and userCan('read') providing different results
userCanRead and userCan('read') providing different results
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.12.x
All All
: Normal trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-18 01:50 UTC by Nigel Jones
Modified: 2010-05-15 15:54 UTC (History)
1 user (show)

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


Attachments

Description Nigel Jones 2008-05-18 01:50:05 UTC
I've noticed today that userCanRead and userCan('read') seem to be providing different results, in particular in Special:Search...

r21402 was committed to patch Bug #8825, but it appears my installation with the Lockdown extension does not have the desired effect.

I proceeded to change line 327 of includes/SpecialSearch.php from:
 if (!$t->userCanRead()) {
to:
 if (!$t->userCanRead() || !$t->userCan( 'read' )) {
which has seemed to solve the problem and provide the desired results.

Any thoughts?
Comment 1 Aaron Schulz 2008-05-18 01:58:49 UTC
See line 1420, there is a shortcircuit check added for perfomance.
Comment 2 Nigel Jones 2008-05-18 03:04:03 UTC
(In reply to comment #1)
> See line 1420, there is a shortcircuit check added for perfomance.
> 

Actually, I'm a bit of a twit, now I look, yes there is the shortcircuit, and it's fixed in SVN...

Sorry all.

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


Navigation
Links