Last modified: 2012-12-12 16:42: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 T44526, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42526 - Permission checks fails in some tests
Permission checks fails in some tests
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Daniel Kinzler
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-29 02:40 UTC by jeblad
Modified: 2012-12-12 16:42 UTC (History)
7 users (show)

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


Attachments

Description jeblad 2012-11-29 02:40:35 UTC
It seems like the $wgUser is sometimes set to group wbeditor and sometimes to sysop. When it is set to sysop testing of permissions will sometimes fail because of failed assumptions.

A typical run where this bug shows up is for group Wikibase and gives six failures in testCheckPermission and testUserCan. Other groups, or combinations of groups, will give other permission related errors.

It is available a workaround in Change Iaa705f72: "Workaround for failing tests", but any tests that manipulates the $wgUser should save previous state and restore it on exit. The tests for EditEntity seems to do this right (saved in $userGroups) but EditContentTest and subclasses seems to fail on this. When the method testCheckPermission or testUserCan is called the permission checks are triggered, and then they will fail sometimes because the user is either a sysop or wbeditor and they have different rights.
Comment 1 tobias.gritschacher 2012-11-29 09:37:03 UTC
The workaround fixes the 6 failing tests when running --group WikibaseRepo but it does not fix all the other (~44) permission-failures when running --group DataValueExtensions,Wikibase

I assume there is a similar problem.
Comment 2 jeblad 2012-11-29 12:59:33 UTC
EditContentTest and subclasses do get it right, but somehow it still fails
Comment 3 Daniel Kinzler 2012-11-29 13:15:03 UTC
I8705a27f fixes 41 of 44 failures
Comment 4 db [inactive,noenotif] 2012-12-01 09:49:35 UTC
(In reply to comment #3)
> I8705a27f fixes 41 of 44 failures

Status Merged
Comment 5 tobias.gritschacher 2012-12-07 10:40:46 UTC
Additional related changesets:
https://gerrit.wikimedia.org/r/#/c/35650/
https://gerrit.wikimedia.org/r/#/c/36180/
Comment 6 abraham.taherivand 2012-12-12 16:42:45 UTC
Verified in Wikidata demo sprint 26

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


Navigation
Links