FIX: Clarify User.group_locked_trust_level.

* Rename User.group_locked_trust_level to User.group_granted_trust_level.

* Remove the column from users table.
This commit is contained in:
Bianca Nenciu
2018-08-25 00:41:03 +02:00
committed by Guo Xiang Tan
parent bdb8e9efdb
commit 2070edf889
9 changed files with 58 additions and 37 deletions

View File

@@ -121,9 +121,11 @@ class Promotion
end
# Then consider the group locked level
if user.group_locked_trust_level
user_group_granted_trust_level = user.group_granted_trust_level
unless user_group_granted_trust_level.blank?
return user.update!(
trust_level: user.group_locked_trust_level
trust_level: user_group_granted_trust_level
)
end