All event invitations special pages perform the same checks (to see if the feature is enabled and if the user is allowed to use the feature), we should consolidate these checks in one place.
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Migrate access check to trait, to remove code duplication | mediawiki/extensions/CampaignEvents | master | +80 -71 |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Daimona | T348779 [EPIC] Invitation Lists MVP | |||
| Resolved | MHorsey-WMF | T369027 Centralise/deduplicate authentication code for invitation special pages. |
Event Timeline
Thanks for writing this ticket, @MHorsey-WMF! Perhaps it can be estimated and discussed by the team in the Monday meeting next week. How does that sound?
Change #1053897 had a related patch set uploaded (by Mhorsey; author: Mhorsey):
[mediawiki/extensions/CampaignEvents@master] Migrate access check to trait, to remove code duplication
Change #1053897 merged by jenkins-bot:
[mediawiki/extensions/CampaignEvents@master] Migrate access check to trait, to remove code duplication
For QA, the only thing to check is that the behaviour of all the invitation list special pages (Special:GenerateInvitationList, Special:InvitationList, Special:MyInvitationLists) is unchanged in the following scenarios:
- Invitation lists not enabled ($wgCampaignEventsEnableEventInvitation = false)
- Invitation lists enabled, but user not allowed to use them
- Invitation lists enabled, and user is allowed to use them
For QA, the only thing to check is that the behaviour of all the invitation list special pages (Special:GenerateInvitationList, Special:InvitationList, Special:MyInvitationLists) is unchanged in the following scenarios:
✅ Invitation lists not enabled ($wgCampaignEventsEnableEventInvitation = false)
✅ Invitation lists enabled, but user not allowed to use them
✅ Invitation lists enabled, and user is allowed to use them
| Special:MyInvitationLists | Special:GenerateInvitationList | Special:InvitationList, |
This is working as expected, sending to product sign off.




