Fix server error from system job detail view (#15640)

This commit is contained in:
Alan Rominger
2024-11-19 12:53:32 -05:00
committed by GitHub
parent 108cf843d4
commit 670b7e7754
3 changed files with 25 additions and 3 deletions

View File

@@ -1858,6 +1858,11 @@ class SystemJobAccess(BaseAccess):
model = SystemJob
def filtered_queryset(self):
if self.user.is_superuser or self.user.is_system_auditor:
return self.model.objects.all()
return self.model.objects.none()
def can_start(self, obj, validate_license=True):
return False # no relaunching of system jobs