mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 22:09:12 +08:00
SECURITY: Any group can be invited into a PM.
This commit is contained in:
@ -248,7 +248,12 @@ class Group < ActiveRecord::Base
|
||||
|
||||
unless group = self.lookup_group(name)
|
||||
group = Group.new(name: name.to_s, automatic: true)
|
||||
group.default_notification_level = 2 if AUTO_GROUPS[:moderators] == id
|
||||
|
||||
if AUTO_GROUPS[:moderators] == id
|
||||
group.default_notification_level = 2
|
||||
group.messageable_level = ALIAS_LEVELS[:everyone]
|
||||
end
|
||||
|
||||
group.id = id
|
||||
group.save!
|
||||
end
|
||||
|
Reference in New Issue
Block a user