Skip to content

Commit

Permalink
Merge pull request #42 from oToToT/judge-message
Browse files Browse the repository at this point in the history
Hide messages from the special judge if non-owner or non-admin
  • Loading branch information
adrien1018 authored Feb 16, 2025
2 parents b12e674 + 1b45596 commit fea01b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/views/submissions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@
<td id="td-score-<%= i %>"></td>
<% end %>
<td>
<i class="indicator glyphicon glyphicon-chevron-down<% unless task&.message_type %> no-display<% end %>"></i>
<i class="indicator glyphicon glyphicon-chevron-down<% unless task&.message_type and (effective_admin? or current_user&.id == @submission.user_id) %> no-display<% end %>"></i>
</td>
<% end %> <%# tr %>
<tr id="td-message-row-<%= i %>" class="collapse collapse-no-anim<% unless task&.message_type %> no-display<% end %>" id="<%= collapse_id %>">
<tr id="td-message-row-<%= i %>" class="collapse collapse-no-anim<% unless task&.message_type and (effective_admin? or current_user&.id == @submission.user_id) %> no-display<% end %>" id="<%= collapse_id %>">
<td id="td-message-<%= i %>" colspan="<%= @has_vss ? 8 : 7 %>">
<% if task&.message_type %>
<% if task&.message_type and (effective_admin? or current_user&.id == @submission.user_id) %>
<% if task.message_type == "html" %>
<%= raw task.message %>
<% else %>
Expand Down

0 comments on commit fea01b1

Please sign in to comment.