Override user profile template based on group

If someone else comes across this, what I ended up doing was overriding the templates for user, user/summary, and user/activity by adding {{#if (or viewingSelf currentUser.staff)}} around the sections that I didn’t want logged in users to see. This overrides the profile templates for all users rather than only users in a specified group, but I decided that was good enough for my use case, to give users a little more general privacy. The template that I worked out still allowed users to choose to feature a topic but hid all other summary stats, topics, and activity except when viewed by the user themselves and staff.

My use case is similar to this topic on anonymous mode for classroom use, in that it would be nice to have an easily accessible way to give users or admin more detailed control over what parts of the profile to show or hide even for logged in users. For example, in a health support group forum, it would be nice to have anonymous accounts in the anon group, then configure to not show the activity page or tab for the anon group.

1 Like