修复判断提交详情显示权限的问题

This commit is contained in:
virusdefender 2015-09-13 13:01:38 +08:00
parent 7f70d46809
commit 4a506939d1
2 changed files with 1 additions and 5 deletions

View File

@ -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,

View File

@ -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>