Last modified: 2014-08-06 13:54:30 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 T69608, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67608 - EducationProgram test fail with permission error caused by WikimediaIncubator
EducationProgram test fail with permission error caused by WikimediaIncubator
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikimediaIncubator (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 67216
  Show dependency treegraph
 
Reported: 2014-07-07 18:02 UTC by Antoine "hashar" Musso (WMF)
Modified: 2014-08-06 13:54 UTC (History)
9 users (show)

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


Attachments

Description Antoine "hashar" Musso (WMF) 2014-07-07 18:02:46 UTC
An EducationProgram unit test fails with the rather unobvious error:

EducationProgram\Tests\ActionsTest::testSpecial with data set #1 ('edit', EducationProgram\CoursePage)
PermissionsError: 

includes/actions/Action.php:292
includes/actions/FormlessAction.php:65
extensions/EducationProgram/tests/phpunit/ActionsTest.php:63
tests/phpunit/MediaWikiTestCase.php:133
tests/phpunit/MediaWikiPHPUnitCommand.php:42
tests/phpunit/phpunit.php:160


https://integration.wikimedia.org/ci/job/mediawiki-core-extensions-integration/67/testReport/(root)/EducationProgram_Tests_ActionsTest__testSpecial/testSpecial_with_data_set__1/
Comment 1 Sage Ross 2014-07-07 18:15:24 UTC
Looks like the actions test tries the 'edit' action, but it runs against the abstract class \EducationPage and all the actions (including 'edit') are specified in the two implementations, \CoursePage and \OrgPage.
Comment 2 Sage Ross 2014-07-07 18:38:50 UTC
Err. Nevermind about the above.

It might have something to do with the recent changes to course page edit rights, which went from having a single 'edit' restriction to a two-tier permission where any user can do basic edits, but only users with advanced rights have access to all the editable fields on a course page.

But looking over the code for that, I can't see what is causing the test to fail.
Comment 3 Max Semenik 2014-07-25 21:17:47 UTC
It's failing due to WikimediaIncubator which adds its own permission checks. Is seems to be a rather architectural problem which I can't fix myself, especially since WI has no tests.
Comment 4 Vogone 2014-07-30 10:16:29 UTC
Changed title to something less pretentious.
Comment 5 Robin Pepermans (SPQRobin) 2014-07-30 10:25:10 UTC
(In reply to Max Semenik from comment #3)
> It's failing due to WikimediaIncubator which adds its own permission checks.
> Is seems to be a rather architectural problem which I can't fix myself,
> especially since WI has no tests.

Since it is of the main aspects of the WikimediaIncubator extension to add extra permission checks, it seems to me that this bug needs a fix in the EducationProgram, not in WI (though I haven't looked at the EP code). And WI does have tests, though not many.

I don't know how EducationProgram works, but I think extensions like that one will be quite difficult to work in Incubator anyway.
Comment 6 Antoine "hashar" Musso (WMF) 2014-08-06 13:54:30 UTC
See also Bug 67615 - PageTriage: test SpecialNewPagesFeedTest::testAddArticles has 'Unknown error: "wminc-error-unprefixed"

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


Navigation
Links