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?
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: