From bb5a16d0620322b4cf80e01284122a1b440ee278 Mon Sep 17 00:00:00 2001 From: Tudor Amariei Date: Wed, 2 Oct 2024 13:16:46 +0300 Subject: [PATCH] Allow admins to view results beforehand --- backend/hub/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/hub/views.py b/backend/hub/views.py index 36943103..9b12ccd4 100644 --- a/backend/hub/views.py +++ b/backend/hub/views.py @@ -428,7 +428,10 @@ class CandidateResultsView(HubListView): template_name = "hub/candidate/results.html" def get_qs(self): - if FeatureFlag.flag_enabled("enable_results_display"): + if ( + FeatureFlag.flag_enabled("enable_results_display") + or self.request.user.groups.filter(name__in=[STAFF_GROUP, SUPPORT_GROUP]).exists() + ): return Candidate.objects_with_org.filter( org__status=Organization.STATUS.accepted, status=Candidate.STATUS.confirmed,