Skip to content

Commit

Permalink
update perms
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Dec 5, 2023
1 parent 7283cf6 commit 3f4b1bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/views/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

@login_required
@require_http_methods(["GET", "POST"])
@upcoming_hunt_required
@block_if_current_hunt
def join(request):
if request.method == "POST":
form = TeamJoinForm(request.POST)
Expand Down Expand Up @@ -54,6 +54,7 @@ def join(request):
@login_required
@require_http_methods(["GET", "POST"])
@block_if_current_hunt
@upcoming_hunt_required
def make(request):
if request.method == "POST":
form = TeamMakeForm(request.POST)
Expand All @@ -79,6 +80,7 @@ def make(request):

@login_required
@upcoming_hunt_required
@block_if_current_hunt
def solo(q: HttpRequest):
hunt_ = Hunt.current_hunt() or Hunt.next_hunt()
team_ = Team.objects.create(
Expand All @@ -93,7 +95,7 @@ def solo(q: HttpRequest):
@login_required
@require_http_methods(["GET"])
@team_required
@upcoming_hunt_required # redundant
@block_if_current_hunt # redundant
def invite(q):
invites = Invite.objects.filter(team=q.user.current_team).values_list(
"code", flat=True
Expand Down

0 comments on commit 3f4b1bf

Please sign in to comment.