Skip to content
Permalink
Browse files

Add more access restrictions

  • Loading branch information...
ibot3 committed Sep 10, 2019
1 parent ba572b0 commit e66dc9b80c8bb7341bf317cc355bb5e2c5981188
Showing with 9 additions and 0 deletions.
  1. +9 −0 sipa/blueprints/usersuite.py
@@ -443,6 +443,9 @@ def terminate_membership():

capability_or_403('membership_end_date', 'edit')

if current_user.membership_end_date.raw_value is not None:
abort(403)

form = TerminateMembershipForm()

if form.validate_on_submit():
@@ -474,6 +477,9 @@ def terminate_membership_confirm():

capability_or_403('membership_end_date', 'edit')

if current_user.membership_end_date.raw_value is not None:
abort(403)

end_date = request.args.get("end_date", None, lambda x: datetime.strptime(x, '%Y-%m-%d').date())

form = TerminateMembershipConfirmForm()
@@ -528,6 +534,9 @@ def continue_membership():

capability_or_403('membership_end_date', 'edit')

if current_user.membership_end_date.raw_value is None:
abort(403)

form = ContinueMembershipForm()

if form.validate_on_submit():

0 comments on commit e66dc9b

Please sign in to comment.
You can’t perform that action at this time.