SECURITY: Any group can be invited into a PM.

This commit is contained in:
Guo Xiang Tan
2017-12-14 10:53:21 +08:00
parent 14cfce2827
commit f2565f6c7e
8 changed files with 97 additions and 9 deletions

View File

@ -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