dmails: fix respond links being shown to non-owner on show page.
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% if CurrentUser.user == @dmail.owner %>
|
||||||
<p>
|
<p>
|
||||||
<%= link_to "Respond", new_dmail_path(:respond_to_id => @dmail) %>
|
<%= link_to "Respond", new_dmail_path(:respond_to_id => @dmail) %>
|
||||||
| <%= link_to "Forward", new_dmail_path(:respond_to_id => @dmail, :forward => true) %>
|
| <%= link_to "Forward", new_dmail_path(:respond_to_id => @dmail, :forward => true) %>
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
| <%= link_to "Report", new_moderation_report_path(moderation_report: { model_type: "Dmail", model_id: @dmail.id }), remote: true, title: "Report this dmail to the moderators" %>
|
| <%= link_to "Report", new_moderation_report_path(moderation_report: { model_type: "Dmail", model_id: @dmail.id }), remote: true, title: "Report this dmail to the moderators" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</p>
|
</p>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user