Skip to content

Commit

Permalink
let admin delete any competition
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Golfari committed Mar 6, 2024
1 parent 37120f2 commit e0d19ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airscore/user/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ def _get_admin_comps():
def _delete_comp(compid: int):
from comp import delete_comp
owner, _, _ = frontendUtils.get_comp_scorekeepers(compid)
if current_user.id == owner['id']:
if current_user.is_admin or current_user.id == owner['id']:
delete_comp(compid)
else:
flash(f"You are not the owner of this competition. You cannot delete it.", category='danger')
Expand Down

0 comments on commit e0d19ca

Please sign in to comment.