Commit 4d612607 authored by ppa19's avatar ppa19

Merge branch '215-bug-acesso-anonimo-a-pagina-de-comparacao-de-disciplina' into 'development'

Resolve "Bug: Acesso anônimo à página de comparação de disciplina"

Closes #215

See merge request !110
parents 614d76c9 7fed6c7c
Pipeline #22140 passed with stage
in 5 minutes and 24 seconds
...@@ -49,6 +49,7 @@ def index(request, submission_id): ...@@ -49,6 +49,7 @@ def index(request, submission_id):
"submission": submission "submission": submission
}) })
@permission_required_or_403('view_course', (Submission, 'id', 'submission_id'))
def compare(request, submission_id): def compare(request, submission_id):
print(request,submission_id) print(request,submission_id)
submission_id = int(submission_id) submission_id = int(submission_id)
...@@ -57,9 +58,6 @@ def compare(request, submission_id): ...@@ -57,9 +58,6 @@ def compare(request, submission_id):
submission = Submission.objects.get(id=submission_id) submission = Submission.objects.get(id=submission_id)
degree = submission.degree degree = submission.degree
if not (degree in request.user.educator.degree.all()):
return redirect("adega:dashboard")
analysis_result = get_list_courses(request.session, degree, submission_id) analysis_result = get_list_courses(request.session, degree, submission_id)
courses_list = analysis_result["cache"] courses_list = analysis_result["cache"]
code_to_name = analysis_result["disciplinas"] code_to_name = analysis_result["disciplinas"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment