diff --git a/submission/views/oj.py b/submission/views/oj.py index 0f7c4a584..78f32b03a 100644 --- a/submission/views/oj.py +++ b/submission/views/oj.py @@ -143,7 +143,10 @@ def get(self, request): except Problem.DoesNotExist: return self.error("Problem doesn't exist") submissions = submissions.filter(problem=problem) - if (myself and myself == "1") or not SysOptions.submission_list_show_all: + if not SysOptions.submission_list_show_all: + if request.user.is_anonymous or not request.user.is_admin_role(): + submissions = submissions.filter(user_id=request.user.id) + if myself and myself == "1": submissions = submissions.filter(user_id=request.user.id) elif username: submissions = submissions.filter(username__icontains=username)