Skip to content

Commit

Permalink
Only staff can see hidden applications
Browse files Browse the repository at this point in the history
  • Loading branch information
aapris committed Nov 4, 2024
1 parent 333f221 commit 0b7dc39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions django_server/application_evaluator/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ def rounds_for_evaluator(cls, user):
def applications_for_evaluator(self, user):
if user.is_staff or self.evaluators.filter(id=user.id).exists() or user.id == self.admin_id:
applications = self.applications.all()
# If the user is not staff or challenge admin, show only applications that have visibility=1
if not user.is_staff and user.id != self.admin_id:
# If the user is not staff, show only applications that have visibility=1
if not user.is_staff:
applications = applications.filter(visibility=1)

return applications
if user.organization in self.submitted_organizations.all():
return (
Expand Down

0 comments on commit 0b7dc39

Please sign in to comment.