From abe5b5eb92948563de75ab49c191fee64331768b Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Fri, 4 Aug 2023 20:19:42 +0700 Subject: [PATCH] Simplify submission admin --- judge/admin/submission.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/judge/admin/submission.py b/judge/admin/submission.py index 2a6067a..7218bb2 100644 --- a/judge/admin/submission.py +++ b/judge/admin/submission.py @@ -194,13 +194,6 @@ class SubmissionAdmin(admin.ModelAdmin): def has_add_permission(self, request): return False - def has_change_permission(self, request, obj=None): - if not request.user.has_perm("judge.edit_own_problem"): - return False - if request.user.has_perm("judge.edit_all_problem") or obj is None: - return True - return obj.problem.is_editor(request.profile) - def lookup_allowed(self, key, value): return super(SubmissionAdmin, self).lookup_allowed(key, value) or key in ( "problem__code",