https://bugzilla.wikimedia.org/show_bug.cgi?id=42526

       Web browser: ---
             Bug #: 42526
           Summary: Permission checks fails in some tests
           Product: MediaWiki extensions
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: WikidataRepo
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---


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.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to