mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
Internal renaming of elder,leader,regular,basic to numbers
Changed internals so trust levels are referred to with TrustLevel[1], TrustLevel[2] etc. This gives us much better flexibility naming trust levels, these names are meant to be controlled by various communities.
This commit is contained in:
parent
c8d3ffb1ee
commit
59d04c0695
49 changed files with 276 additions and 274 deletions
|
@ -159,7 +159,7 @@ class ImportScripts::Base
|
|||
admin.password = SecureRandom.uuid
|
||||
admin.save!
|
||||
admin.grant_admin!
|
||||
admin.change_trust_level!(:regular)
|
||||
admin.change_trust_level!(TrustLevel[4])
|
||||
admin.email_tokens.update_all(confirmed: true)
|
||||
admin
|
||||
end
|
||||
|
@ -280,7 +280,7 @@ class ImportScripts::Base
|
|||
opts[:username] = UserNameSuggester.suggest(opts[:username] || opts[:name] || opts[:email])
|
||||
end
|
||||
opts[:email] = opts[:email].downcase
|
||||
opts[:trust_level] = TrustLevel.levels[:basic] unless opts[:trust_level]
|
||||
opts[:trust_level] = TrustLevel[1] unless opts[:trust_level]
|
||||
opts[:active] = true
|
||||
opts[:import_mode] = true
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue