Skip to content

Enforce signup priority correctness - #565

Open
georgelgeback wants to merge 3 commits into
mainfrom
signup-enforce-correctness
Open

Enforce signup priority correctness#565
georgelgeback wants to merge 3 commits into
mainfrom
signup-enforce-correctness

Conversation

@georgelgeback

Copy link
Copy Markdown
Contributor

Basically this changes:

  • We no longer allow people to create or edit signups with priorities they should not be allowed to use. Previously a regular member could enter "Ordförande" as their priority even if it was not supported for the event, and if they weren't actually ordförande.
  • We now check that a user has the nollning priority they claim, previously a mentee could claim to be a mentor, or vice-versa.
  • GetMyPriorities now returns all your priorities, not just the most recent one. This probably should not matter but in the rare case someone is both a mentee and mentor, or mentor for both mission and mentor groups, this should return both their roles.

hannesblaman
hannesblaman previously approved these changes Aug 16, 2026

@hannesblaman hannesblaman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Realized that group system doesn't care about which year's nollning your group belongs to. Fixed accordingly.

Otherwise LGTM!

@hannesblaman

hannesblaman commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

On second thought, I reworked the get_user_nollning_priorities funtction to only loop through the groups that the user actually has. Should optimize with less unnecessary looping but keep the same functionality.

If you are happy with that change then it LGTM. Re-approved!

@hannesblaman
hannesblaman self-requested a review August 16, 2026 23:16
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