Skip to content
Snippets Groups Projects
Commit 67b0ba77 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Ensure reviewers can access their own reviews

parent 9ce3c22f
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<td>-</td> <td>-</td>
{% else %} {% else %}
<td class="reviews-sidebar__author" colspan="2"> <td class="reviews-sidebar__author" colspan="2">
{% if request.user.is_apply_staff %} {% if request.user.is_apply_staff or request.user == review.author %}
<a href="{% url 'apply:submissions:reviews:review' submission_pk=review.submission.id pk=review.id %}"> <a href="{% url 'apply:submissions:reviews:review' submission_pk=review.submission.id pk=review.id %}">
<span>{{ review.author }}</span> <span>{{ review.author }}</span>
</a> </a>
......
...@@ -22,7 +22,11 @@ class ScoreFieldBlock(OptionalFormFieldBlock): ...@@ -22,7 +22,11 @@ class ScoreFieldBlock(OptionalFormFieldBlock):
template = 'review/render_scored_answer_field.html' template = 'review/render_scored_answer_field.html'
def render(self, value, context=None): def render(self, value, context=None):
comment, score = context['data'] try:
comment, score = context['data']
except ValueError:
# TODO: Remove json load as data moved away from JSON
comment, score = json.loads(context['data'])
context.update(**{ context.update(**{
'comment': comment, 'comment': comment,
'score': RATE_CHOICES_DICT.get(int(score), RATE_CHOICE_NA) 'score': RATE_CHOICES_DICT.get(int(score), RATE_CHOICE_NA)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment