mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 08:22:46 +08:00
ba6d4b2a8d
If you turn it on now, default all users to approved since they were previously. Also support approving a user that doesn't have a reviewable record (it will be created first.) This also includes a refactor to move class method calls to `DiscourseEvent` into an initializer. Otherwise the load order of classes makes a difference in the test environment and some settings might be triggered and others not, randomly.
26 lines
682 B
Ruby
26 lines
682 B
Ruby
require 'enum_site_setting'
|
|
|
|
class EmojiSetSiteSetting < EnumSiteSetting
|
|
|
|
def self.valid_value?(val)
|
|
values.any? { |v| v[:value] == val.to_s }
|
|
end
|
|
|
|
def self.values
|
|
@values ||= [
|
|
{ name: 'emoji_set.apple_international', value: 'apple' },
|
|
{ name: 'emoji_set.google', value: 'google' },
|
|
{ name: 'emoji_set.twitter', value: 'twitter' },
|
|
{ name: 'emoji_set.emoji_one', value: 'emoji_one' },
|
|
{ name: 'emoji_set.win10', value: 'win10' },
|
|
{ name: 'emoji_set.google_classic', value: 'google_classic' },
|
|
{ name: 'emoji_set.facebook_messenger', value: 'facebook_messenger' },
|
|
]
|
|
end
|
|
|
|
def self.translate_names?
|
|
true
|
|
end
|
|
|
|
end
|