Skip to content

Allow Staff and Admin to see unpublished events - #118

Merged
AlexanderWangY merged 7 commits into
devfrom
TECH-195
Oct 7, 2025
Merged

Allow Staff and Admin to see unpublished events#118
AlexanderWangY merged 7 commits into
devfrom
TECH-195

Conversation

@hugoliu-code

@hugoliu-code hugoliu-code commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

Description

Changed the GET /events endpoint

  • Replaced "include_unpublished" url parameter to "scope"
  • scope=all will return ALL events, unpublished or published, and is protected behind superuser permissions
  • scope=scoped will return all published events, as well as unpublished events the user is a staff or admin for
  • scope=published will return all published events
  • no parameter will default to published events only

New goose migration file to create new enum for type safety

Updated api call in frontend to GET /events?scope=scoped on portal page

Updated admin call to GET /events as well

New helper function in parser folder to help validate the scope parameter

Linked Jira Ticket

https://swamphacks.atlassian.net/jira/software/projects/TECH/boards/1?selectedIssue=TECH-195

Type of Change

Refactor

Checklist

  • My code follows the project's style guidelines
  • I have commented on complex parts of the code
  • I have updated documentation if necessary
  • I have updated or added tests to cover my changes
  • I have updated the OpenAPI YAML or other API schema files if applicable

Additional Notes

- Updated SQL function with new scope param
- Updated backend code
- Updated frontend call
- Created new migration to add new enum for type safety
@AlexanderWangY
AlexanderWangY merged commit a49858b into dev Oct 7, 2025
2 checks passed
@AlexanderWangY
AlexanderWangY deleted the TECH-195 branch October 7, 2025 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants