Page MenuHomePhabricator

Add support for privately registered participants to the "List the participants of an event" API endpoint
Closed, ResolvedPublic

Description

Acceptance criteria

  • The endpoint should accept a parameter to determine if privately registered participants should be included
    • There should be a permission check on that
  • For each participant, the response should say whether they're privately registered or not
  • The documentation of the endpoint should be updated

Event Timeline

Change 849186 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Add support for private registration to ListParticipantsHandler

https://gerrit.wikimedia.org/r/849186

vyuen changed the task status from Open to In Progress.Oct 31 2022, 4:45 PM
vyuen moved this task from Backlog to V1 (MVP) on the Campaign-Registration board.

Change 849186 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add support for private registration to ListParticipantsHandler

https://gerrit.wikimedia.org/r/849186

vaughnwalters subscribed.

If query param ?include_private=false, then only publicly registered participants display:

Screen Shot 2022-11-03 at 4.29.31 PM.png (1×2 px, 341 KB)


If query param ?include_private=true is included, but user without permission to see privately registered users is logged in, then a 403 error is thrown. Note that this 403 is thrown even if the only privately registered user for the event is the one who is logged in.

Screen Shot 2022-11-03 at 4.31.06 PM.png (940×2 px, 184 KB)


If query param ?include_private=true is included, and organizer is logged in, then participants are displayed (including privately registered participants):

Screen Shot 2022-11-03 at 4.41.26 PM.png (1×1 px, 336 KB)


Also even if the user logged in is an admin but is not the organizer of the event, they get the 403 error:

Screen Shot 2022-11-03 at 5.08.30 PM.png (1×2 px, 204 KB)


@Daimona As a housekeeping note, I suggest moving the include_private param underneath id as to keep the required params together at the top in the endpoint doc for this:

Screen Shot 2022-11-03 at 5.18.02 PM.png (564×784 px, 74 KB)

Everything is working correctly so I am marking this as done/resolved ✅

@Daimona As a housekeeping note, I suggest moving the include_private param underneath id as to keep the required params together at the top in the endpoint doc for this:

Good point, done.