Fix display rights in user profile for mailing

This commit is contained in:
Antoine Bartuccio 2017-08-18 23:09:01 +02:00
parent e82e338e76
commit 3a6f7009fd

View File

@ -59,9 +59,9 @@
</tbody> </tbody>
</table> </table>
{% if user.mailing_subscriptions.exists() %} {% if profile.mailing_subscriptions.exists() and (profile.id == user.id or user.is_root) %}
<h4>{% trans %}Subscribed mailing lists{% endtrans %}</h4> <h4>{% trans %}Subscribed mailing lists{% endtrans %}</h4>
{% for sub in user.mailing_subscriptions.all() %} {% for sub in profile.mailing_subscriptions.all() %}
<p>{{ sub }} <a href="{{ url('club:mailing_subscription_delete', mailing_subscription_id=sub.id) }}">{% trans %}Unsuscribe{% endtrans %}</a></p> <p>{{ sub }} <a href="{{ url('club:mailing_subscription_delete', mailing_subscription_id=sub.id) }}">{% trans %}Unsuscribe{% endtrans %}</a></p>
{% endfor %} {% endfor %}
{% endif %} {% endif %}