Skip to content

Commit

Permalink
Missing permissions checks in the mail history brick.
Browse files Browse the repository at this point in the history
  • Loading branch information
genglert committed Mar 5, 2024
1 parent f48b915 commit 9f61c2a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- An icon was missing in the theme "chantilly" ('images/meeting_48.png').
* Tickets :
- The name of the button to link to a Ticket (visible in configuration) has been fixed.
* Emails :
- Some permissions checks in the mail history brick were missing.


== Version 2.3.17 ==
Expand Down
16 changes: 15 additions & 1 deletion creme/emails/templates/emails/bricks/mails-history.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

{% block brick_table_rows %}
{% for mail in page.object_list %}
<tr>
<tr>{% has_perm_to view mail as view_perm %}
{% if view_perm %}
<td {% brick_table_data_status primary %} class="email-sender" data-type="email">{% print_field object=mail field='sender' %}</td>
<td class="email-recipient" data-type="email">{% print_field object=mail field='recipient' %}</td>
<td class="email-subject">{{mail.subject}}</td>
Expand All @@ -46,6 +47,19 @@
{% endif %}
{% endif %}
</td>
{% else %}
<td {% brick_table_data_status primary %} class="email-sender" data-type="email">{{HIDDEN_VALUE}}</td>
<td class="email-recipient" data-type="email">{{HIDDEN_VALUE}}</td>
<td class="email-subject">{{HIDDEN_VALUE}}</td>
<td class="email-status">{{HIDDEN_VALUE}}</td>
<td class="email-sending-date" data-type="date">{{HIDDEN_VALUE}}</td>
<td {% brick_table_data_status action %}>
{% brick_table_action id='view' label=_('Details') enabled=False %}
</td>
<td {% brick_table_data_status action %}>
{% brick_table_action id='update' label=_('Re-send') icon='refresh' enabled=False %}
</td>
{% endif %}
</tr>
{% endfor %}
{% endblock %}
Expand Down

0 comments on commit 9f61c2a

Please sign in to comment.