Skip to content

A platform for community discussion. Free, open, simple.

FIX: allow moderators to create categories setting broken

Sam8d7c10f7f2a1
diff --git a/app/models/group.rb b/app/models/group.rb
index 0f2959048a3..65bc2c7fd49 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -290,7 +290,7 @@ class Group < ActiveRecord::Base
# way to have the membership in a table
case name
when :everyone
- group.visibility_level = Group.visibility_levels[:owners]
+ group.visibility_level = Group.visibility_levels[:staff]
group.save!
return group
when :moderators
diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb
index 8419e89976c..c70570411b5 100644
--- a/spec/models/group_spec.rb
+++ b/spec/models/group_spec.rb
@@ -221,9 +221,9 @@ describe Group do
end
describe '.refresh_automatic_group!' do
- it "makes sure the everyone group is not visible" do
+ it "makes sure the everyone group is not visible except to staff" do
g = Group.refresh_automatic_group!(:everyone)
- expect(g.visibility_level).to eq(Group.visibility_levels[:owners])
+ expect(g.visibility_level).to eq(Group.visibility_levels[:staff])
end
it "ensures that the moderators group is messageable by all" do