Skip to content

Commit

Permalink
remove outdated permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Dec 7, 2023
1 parent bf53860 commit f4e46cf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,6 @@ class Hint(models.Model):
def __str__(self):
return self.hint

class Meta:
permissions = [("view_before_start", "Play game before start")]


class Team(models.Model):
# owner = models.ForeignKey(User, on_delete=models.PROTECT, related_name="teams_ownership") potentially add this later
id = models.AutoField(primary_key=True)
Expand Down
2 changes: 0 additions & 2 deletions core/views/qr.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def during_hunt(f):
Decorator for views that checks that the hunt is currently active.
User can access the view if they meet ANY of the following conditions:
- They have the view_before_start permission and the hunt hasn't ended
- The hunt has started and hasn't ended
- They are on the testers list for that hunt
- They are a superuser
Expand All @@ -95,7 +94,6 @@ def wrapped(*args, **kwargs):
if any(
[
hunt_.started and not hunt_.ended,
request.user.has_perm("core.view_before_start") and not hunt_.ended,
hunt_.testers.contains(request.user),
request.user.is_superuser,
]
Expand Down

0 comments on commit f4e46cf

Please sign in to comment.