Skip to content

Added multi admin support for event creation and editing#2114

Open
maernest04 wants to merge 3 commits intodevfrom
ernest_ma/allow_admin_editing
Open

Added multi admin support for event creation and editing#2114
maernest04 wants to merge 3 commits intodevfrom
ernest_ma/allow_admin_editing

Conversation

@maernest04
Copy link
Copy Markdown
Collaborator

@maernest04 maernest04 commented Apr 29, 2026

PR for #2113

Problem

For SCEvents, event creation allowed admins to create and edit their own events but there was no way for other admins to be able to edit events they didn't create. There should be a way for the event's original creator to add and remove admins who can edit their event.

Solution

Added a multi-admin picker UI to both the Create Event and Edit Event pages. Admins can search for other admins by name or email and add/remove them from the event. A new backend endpoint POST /api/User/admins/validate resolves stored admin IDs into user objects so the edit page can display names and emails instead of raw IDs.

Files Changed

File Change
src/Pages/Events/CreateEventPage.js Multi-admin picker UI, sends admins array in payload
src/Pages/Events/EditEventPage.js Multi-admin picker UI, admin ID resolution, self-removal warning
src/APIFunctions/User.js validateEventAdmins frontend API function
api/main_endpoints/routes/User.js POST /admins/validate endpoint
test/api/User.js Tests for /admins/validate

Screenshots

Event Admin section of event creation and editing

Screenshot 2026-04-28 at 9 30 35 PM

Searching for any person to add as an editor (admin, member, any level of membership)

Screenshot 2026-04-28 at 9 30 43 PM

Warning when attempting to remove every event admin, including themselves

Screenshot 2026-04-28 at 9 31 20 PM

Warning when attempting to save changes after removing themselves as event admin

Screenshot 2026-04-28 at 9 31 33 PM

- Added ability to add and remove admins from access to editing an event
- Added admin search to search through all available admins
- Added endpoints to check admin IDs
- Added warnings when adding or removing admins, including removing themselves
Copy link
Copy Markdown
Collaborator

@steeevin88 steeevin88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. can you add some screenshots to show what the UI looks like?
  2. CI is failing, let's fix this
  3. from my (albeit brief) understanding, this code only allows us to add Clark admins as event admins, but realistically, we should allow... any person? how much more complicated would this be, i know admins is already a lot of code 😅 thought this would be a simpler change apologies

- Changed route to allow any authenticated user to edit avents
- User search and admin validation now support any user like non officer users (members or non members)
- Removed site wide admin / officer role checks for the event management UI
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