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

@@ -83,6 +83,7 @@ class User(View):
data = {
"user": user,
"is_self": is_self,
"has_groups": models.GroupMember.objects.filter(user=user).exists(),
"shelves": shelf_preview,
"shelf_count": shelves.count(),
"activities": paginated.get_page(request.GET.get("page", 1)),