mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-01-01 18:11:50 +00:00
修复判断提交详情显示权限的问题
This commit is contained in:
parent
7f70d46809
commit
4a506939d1
@ -114,9 +114,6 @@ def my_submission(request, submission_id):
|
||||
except Submission.DoesNotExist:
|
||||
return error_page(request, u"提交不存在")
|
||||
|
||||
if submission.user_id != request.user.id and not submission.shared:
|
||||
return error_page(request, u"提交不存在")
|
||||
|
||||
if submission.contest_id:
|
||||
try:
|
||||
problem = ContestProblem.objects.get(id=submission.problem_id,
|
||||
|
@ -62,7 +62,6 @@
|
||||
<div id="code-field">
|
||||
<textarea id="code-editor">{{ submission.code }}</textarea>
|
||||
</div>
|
||||
{% ifequal request.user.id submission.user_id %}
|
||||
|
||||
<div id="share-code" class="col-lg-6 col-md-6">
|
||||
{% if submission.shared %}
|
||||
@ -74,7 +73,7 @@
|
||||
{% if not submission.shared %}style="display: none" {% endif %}>{{ problem.title }}
|
||||
{{ request.build_absolute_uri }}</textarea>
|
||||
</div>
|
||||
{% endifequal %}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user