show groups on member pages if allowed

- display groups on user pages when not the logged in user
- restrict visibility of groups on user pages and group pages themselves according to privacy settings
This commit is contained in:
Hugh Rundle
2021-09-27 17:51:18 +10:00
parent 277c033fda
commit 81e5ff5b76
3 changed files with 11 additions and 3 deletions

View File

@ -75,8 +75,7 @@
<a href="{{ url }}">{% trans "Lists" %}</a>
</li>
{% endif %}
<!-- TODO: fix this: user.groups_set isn't what you think! -->
{% if is_self or user.groups_set.exists %}
{% if is_self or has_groups %}
{% url 'user-groups' user|username as url %}
<li{% if url in request.path %} class="is-active"{% endif %}>
<a href="{{ url }}">{% trans "Groups" %}</a>