Page MenuHomePhabricator

EducationProgram test fail with permission error caused by WikimediaIncubator
Closed, DeclinedPublic

Description

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/


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=67615

Details

Reference
bz67608

Event Timeline

bzimport raised the priority of this task from to Needs Triage.
bzimport set Reference to bz67608.
bzimport added a subscriber: Unknown Object (MLST).
hashar created this task.Jul 7 2014, 6:02 PM

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.

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.

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.

Changed title to something less pretentious.

(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.

hashar added a comment.Aug 6 2014, 1:54 PM

See also Bug 67615 - PageTriage: test SpecialNewPagesFeedTest::testAddArticles has 'Unknown error: "wminc-error-unprefixed"

Ebe123 added a subscriber: Ebe123.Nov 24 2014, 8:50 PM
Restricted Application added subscribers: StudiesWorld, Hydriz, Aklapper. · View Herald TranscriptDec 10 2015, 11:03 PM
hashar triaged this task as Low priority.Oct 6 2016, 3:12 PM
hashar closed this task as Declined.Nov 24 2016, 2:10 PM

Lets decline that one. I guess WikimediaIncubator and EducationProgram are mutually exclusive :]