mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 17:06:31 -06:00
FIX: Do not downcase group name in current user serializer
This commit is contained in:
parent
dbdb5b9a47
commit
3d39b4bbb5
@ -52,7 +52,7 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
:skip_new_user_tips
|
||||
|
||||
def groups
|
||||
object.visible_groups.pluck(:id, :name).map { |id, name| { id: id, name: name.downcase } }
|
||||
object.visible_groups.pluck(:id, :name).map { |id, name| { id: id, name: name } }
|
||||
end
|
||||
|
||||
def link_posting_access
|
||||
|
@ -128,7 +128,7 @@ RSpec.describe CurrentUserSerializer do
|
||||
it "should only show visible groups" do
|
||||
Fabricate.build(:group, visibility_level: Group.visibility_levels[:public])
|
||||
hidden_group = Fabricate.build(:group, visibility_level: Group.visibility_levels[:owners])
|
||||
public_group = Fabricate.build(:group, visibility_level: Group.visibility_levels[:public])
|
||||
public_group = Fabricate.build(:group, visibility_level: Group.visibility_levels[:public], name: "UppercaseGroupName")
|
||||
hidden_group.add(member)
|
||||
hidden_group.save!
|
||||
public_group.add(member)
|
||||
|
Loading…
Reference in New Issue
Block a user