The discussion is about issues with the Admin badge and Moderator group on a Discourse forum. V0rTeX reported two bugs: the Admin badge is not visible on posts and the Moderator group appears on their profile. cpradio explained that these are intentional behaviors and provided a CSS workaround to hide the Moderator group. However, V0rTeX revealed that the Admin badge used to be visible on posts before an update and still appears on their profile.
Mittineague suggested that the issue is not about hiding groups, but rather about which group is displayed. They investigated the code and found that the displayed group is determined by the displayGroups computed property in models/user.js.es6, which prioritizes the “moderators” group.
V0rTeX ultimately decided to keep the Moderator group hidden.
I have a temporary workaround. I granted myself Moderator status and changed “This user is a moderator” text to “This user is part of the staff” and it appears, but here comes the other issue:
That is wrong. When i migrated the forum to Discourse - It used to be a phpBB3 forum i had a badge saying “This user is administrator”. I wasn’t on the moderators group. After some updates it disappeared from posts, but it still shows on my profile as seen on the picture.
I tried this before, but it doesn’t hides “group”.
This only half solves my issue, since it hides these two groups i mentioned, which i want to appear not just the moderator one. I’m sorry for being a pain.
Again, it is going to leave the comma, but there isn’t anything I can do about that.
I’m a bit confused by what you are trying to do though, as earlier you wanted to remove the word groups, and now it seems you need it since there will be other groups listed…
Maybe provide a screenshot of what it looks like now and another of what you want it to look like.
If I’m understanding, the problem isn’t that a Group is being shown, but which group is being shown.
eg. as an Admin you want that to be shown as the group rather than Moderator
I know the “double shield” thing has been fixed, and IMHO the Badges that display on the User Cards are well chosen from the larger set of Badges.
But I don’t know how it is decided which Group gets displayed on a Profile.
Maybe by Id ?
I need to go out for a while but I’ll look into it a bit ASAP
EDIT
I had a look around and the decision looks fairly hard-coded in AFAICT
templates/user/user.hbs has
{{#if model.displayGroups}}
<dt>{{i18n 'groups.title' count=model.displayGroups.length}}</dt>
<dd class='groups'>
{{#each group in model.displayGroups}}
<span>{{#link-to 'group' group class="group-link"}}{{group.name}}{{/link-to}}</span>
{{/each}}
</dd>
{{/if}}