Cannot change member_visibility_level of automatic groups
A bug was reported where changing the member_visibility_level of an automatic group via the Manage UI does not save the changes, despite the UI reporting “Saved!” mdoggydog. This issue is independent of a feature request to respect the visibility settings of all automatic groups.
pmusaraj initially tested and could not reproduce the issue, but later found that the bug is related to the “Who can see this group’s members?” setting, not the “Who can see this group?” setting. A fix has been proposed in https://github.com/discourse/discourse/pull/25281 and is awaiting review.
mdoggydog has confirmed that the fix works, but notes that there is an underlying structural bug that needs to be investigated and fixed, where the frontend reports “Saved!” even when the backend has not saved the changes.
It is not possible to change the member visibility of automatic groups via the groups Manage UI. More specifically: the UI allows selecting a new value, and it cheerfully reports “Saved!” when Save Changes is pressed, but the request is silently ignored by the backend.
I just tested this and I can’t reproduce the issue exactly, but we may be testing different things.
Here on meta, I switched the trust_level_4 group’s visibility from Logged on users to Everyone. Before the change, visiting https://meta.discourse.org/g/trust_level_4 returned a 404, after the change it returns the list of members in the group. I have since reversed this edit here so that route is back to a 404 for anons, but changing the visibility works. Also tested the same thing locally.
Is the issue that after changing the group visbility, the group isn’t listed in /groups for regular users? That’s for de-cluttering reasons (it’s not a recent regression, that’s how it was designed in 2017)… regular users can’t join automatic groups, so there’s not much use in listing them in the directory even when the visibility allows it.
Yay, thank you @pmusaraj — the fix even seems to work!
There is an underlying structural bug that still needs to be investigated and fixed: the fact that a user can push “Save” on the frontend and the frontend will report “Saved!”, even when the backend has not saved anything. I’m not sure where/how to file that, but it is tech debt that should be tracked somewhere until fixed.