mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: grant trust level when bulk adding users to group
This commit is contained in:
parent
7496f373cd
commit
d5bcc70e9c
7 changed files with 86 additions and 9 deletions
|
@ -414,6 +414,10 @@ class Group < ActiveRecord::Base
|
|||
if self.title.present?
|
||||
User.where(id: user_ids).update_all(title: self.title)
|
||||
end
|
||||
|
||||
if self.grant_trust_level.present?
|
||||
Jobs.enqueue(:bulk_grant_trust_level, user_ids: user_ids, trust_level: self.grant_trust_level)
|
||||
end
|
||||
end
|
||||
true
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue