How does visibility of automatic groups work?

I’m a bit confused as to how the visibility of automatic groups works. At this point, I am just talking about the /groups directory.
Here is what I am seeing in a pretty fresh install of 2.7.0.beta4:

  • If an user with admin or moderator bits looks at /groups, they see all 8 automatic groups (admins, moderators, staff, trust_level_[0-4]).
  • If a non-admin, non-moderator user (no matter the trust_level) looks at /groups, they see only the moderators group.

But, all of these groups have the same, default Visibility settings:

  • Who can see this group? Logged on users
  • Who can see this group’s members? Everyone

Is this how it is supposed to work? Or is there something wrong with the handling of the Visibility parameters for these groups?

4 Likes

There is a comment in the code that explains what is going on: “hide automatic groups from all non stuff to de-clutter page.” That happens here: discourse/groups_controller.rb at master · discourse/discourse · GitHub.

What the code is doing is overriding the group visibility settings for automatic groups when the groups page is viewed by a non-staff users. Only the moderators group will be displayed.

Unrelated to the issue, but when I tried to onebox the Github link that I posted above, the code was displayed in the onebox without any formatting in the preview:

1 Like

So it’s no way to allow non stuff user also see automatic groups?