We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 81dc0b5 commit beffcf9Copy full SHA for beffcf9
1 file changed
app/grandchallenge/evaluation/views/__init__.py
@@ -1576,17 +1576,12 @@ def get_permission_object(self):
1576
return self.phase
1577
1578
1579
-class PhaseStarterKitDownload(
1580
- CachedPhaseMixin,
1581
- ObjectPermissionRequiredMixin,
1582
- View,
1583
-):
1584
- permission_required = "evaluation.change_phase"
1585
- accept_global_perms = True
1586
- raise_exception = True
1587
-
1588
- def get_permission_object(self):
1589
- return self.phase
+class PhaseStarterKitDownload(UserPassesTestMixin, CachedPhaseMixin, View):
+ def test_func(self):
+ return (
+ self.request.user.has_perm("evaluation.change_phase", self.phase)
+ or self.request.user.is_staff
+ )
1590
1591
def get(self, *_, **__):
1592
phase = self.phase
0 commit comments