Skip to content

Commit

Permalink
Allow modifications to take place when editing candidates
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Nov 22, 2024
1 parent 0cd387b commit 1d568d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/hub/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ def __init__(self, *args, **kwargs):
def save(self, commit=True):
is_user_staff = self.user.in_committee_or_staff_groups()
is_registration_open = FeatureFlag.flag_enabled(PHASE_CHOICES.enable_candidate_registration)
if not is_user_staff and not is_registration_open:
is_editing_enabled = FeatureFlag.flag_enabled(FLAG_CHOICES.enable_candidate_editing)
if not is_user_staff and not is_registration_open and not is_editing_enabled:
# This should not happen unless someone messes with the form code
raise PermissionDenied(_("Candidate registration is closed."))

Expand Down

0 comments on commit 1d568d2

Please sign in to comment.