mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-01-06 04:21:51 +00:00
use 'nginx' as nginx running user
This commit is contained in:
parent
0f9f34df65
commit
b5c0550652
@ -1,4 +1,4 @@
|
|||||||
user nobody;
|
user nginx;
|
||||||
daemon off;
|
daemon off;
|
||||||
pid /tmp/nginx.pid;
|
pid /tmp/nginx.pid;
|
||||||
worker_processes auto;
|
worker_processes auto;
|
||||||
@ -20,7 +20,6 @@ http {
|
|||||||
gzip on;
|
gzip on;
|
||||||
gzip_vary on;
|
gzip_vary on;
|
||||||
gzip_types application/javascript text/css;
|
gzip_types application/javascript text/css;
|
||||||
client_body_temp_path /tmp 1 2;
|
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
@ -194,7 +194,7 @@ class ContestSubmissionListAPI(APIView):
|
|||||||
|
|
||||||
# 封榜的时候只能看到自己的提交
|
# 封榜的时候只能看到自己的提交
|
||||||
if contest.rule_type == ContestRuleType.ACM:
|
if contest.rule_type == ContestRuleType.ACM:
|
||||||
if not contest.real_time_rank and not contest.is_contest_admin(request.user):
|
if not contest.real_time_rank and not request.user.is_contest_admin(contest):
|
||||||
submissions = submissions.filter(user_id=request.user.id)
|
submissions = submissions.filter(user_id=request.user.id)
|
||||||
|
|
||||||
data = self.paginate_data(request, submissions)
|
data = self.paginate_data(request, submissions)
|
||||||
|
Loading…
Reference in New Issue
Block a user