mediawiki-skins-MinervaNeue/includes/permissions
Bartosz Dziewoński 700b1c43e9 Allow passing context to MinervaPagePermissions
Previously it always used the global context RequestContext::getMain(),
which is basically equivalent to using $wgTitle or $wgUser, and will
not produce the correct results when used in other situations than
regular web requests (e.g. API requests or jobs).

MinervaPagePermissions is required to parse pages (due to the custom
section edit links in SkinMinerva::doEditSectionLink), which is often
done in API requests or jobs.

Pass the appropriate context in SkinMinerva::getPermissions(). This
fixes T234868. Note that MinervaPagePermissions is also used elsewhere
and I am not fixing those cases.

Depends-On: Iaa83e5f801c7776bf8218d8ce7484e2485b227d4
Bug: T234868
Change-Id: I2d6fd525f20a0b6beeeaa731f6b8caa471b8529d
2020-01-29 10:33:36 -08:00
..
IMinervaPagePermissions.php [dev] [edit] rename EDIT permission to CONTENT_EDIT 2019-09-04 19:29:38 +02:00
MinervaPagePermissions.php Allow passing context to MinervaPagePermissions 2020-01-29 10:33:36 -08:00