mirror of
https://github.com/discourse/discourse.git
synced 2026-08-11 13:35:20 -05:00
UX: display moderators group name in the group dropdown menu.
This commit is contained in:
@@ -121,7 +121,9 @@ class GroupsController < ApplicationController
|
||||
|
||||
format.json do
|
||||
groups = Group.visible_groups(current_user)
|
||||
groups = groups.where(automatic: false) if !guardian.is_staff?
|
||||
if !guardian.is_staff?
|
||||
groups = groups.where("automatic IS FALSE OR groups.id = #{Group::AUTO_GROUPS[:moderators]}")
|
||||
end
|
||||
|
||||
render_json_dump(
|
||||
group: serialize_data(group, GroupShowSerializer, root: nil),
|
||||
|
||||
Reference in New Issue
Block a user