Module: Decidim::Voca::Rpc::EnumCasting

Includes:
VocaDecidim
Defined in:
app/rpc/decidim/voca/rpc/enum_casting.rb

Constant Summary

Constants included from VocaDecidim

VocaDecidim::DecidimOrganizationColorSettings, VocaDecidim::DecidimOrganizationFeatureFlagSettings, VocaDecidim::DecidimOrganizationFileUploadSettings, VocaDecidim::DecidimOrganizationLocaleSettings, VocaDecidim::DecidimOrganizationNamingSettings, VocaDecidim::DecidimOrganizationPermissionSettings, VocaDecidim::DecidimOrganizationSMTPSettings, VocaDecidim::GetSettingsResponse, VocaDecidim::PingResponse, VocaDecidim::SETTINGS_MACHINE_TRANSLATION_PRIORITY_OPTION, VocaDecidim::SETTINGS_REGISTER_MODE_OPTION, VocaDecidim::SETTINGS_SMTP_AUTHENTICATION_OPTION, VocaDecidim::SETTINGS_SMTP_OPENSSL_OPTION, VocaDecidim::SeedAdminRequest, VocaDecidim::SeedAdminResponse, VocaDecidim::SetSettingsRequest

Class Method Summary collapse

Class Method Details

.machine_translation_display_priorityObject



26
27
28
29
30
31
# File 'app/rpc/decidim/voca/rpc/enum_casting.rb', line 26

def self.machine_translation_display_priority
  EnumCaster.new(SETTINGS_MACHINE_TRANSLATION_PRIORITY_OPTION, {
    "original" => SETTINGS_MACHINE_TRANSLATION_PRIORITY_OPTION::SETTINGS_MACHINE_TRANSLATION_PRIORITY_ORIGINAL,
    "translated" => SETTINGS_MACHINE_TRANSLATION_PRIORITY_OPTION::SETTINGS_MACHINE_TRANSLATION_PRIORITY_TRANSLATED
  })
end

.smtp_authenticationObject



41
42
43
44
45
46
47
48
# File 'app/rpc/decidim/voca/rpc/enum_casting.rb', line 41

def self.smtp_authentication
  EnumCaster.new(SETTINGS_SMTP_AUTHENTICATION_OPTION, {
    "plain": SETTINGS_SMTP_AUTHENTICATION_OPTION::SETTINGS_SMTP_AUTHENTICATION_PLAIN,
    "login": SETTINGS_SMTP_AUTHENTICATION_OPTION::SETTINGS_SMTP_AUTHENTICATION_LOGIN,
    "cram_md5": SETTINGS_SMTP_AUTHENTICATION_OPTION::SETTINGS_SMTP_AUTHENTICATION_CRAM_MD5,
    "none": SETTINGS_SMTP_AUTHENTICATION_OPTION::SETTINGS_SMTP_AUTHENTICATION_NONE
  })
end

.smtp_openssl_verify_modeObject



49
50
51
52
53
54
# File 'app/rpc/decidim/voca/rpc/enum_casting.rb', line 49

def self.smtp_openssl_verify_mode
  EnumCaster.new(SETTINGS_SMTP_OPENSSL_OPTION, {
    "none": SETTINGS_SMTP_OPENSSL_OPTION::SETTINGS_SMTP_OPENSSL_NONE,
    "peer": SETTINGS_SMTP_OPENSSL_OPTION::SETTINGS_SMTP_OPENSSL_PEER,
  })
end

.users_registration_modeObject



33
34
35
36
37
38
39
# File 'app/rpc/decidim/voca/rpc/enum_casting.rb', line 33

def self.users_registration_mode
  EnumCaster.new(SETTINGS_REGISTER_MODE_OPTION, {
      "enabled": SETTINGS_REGISTER_MODE_OPTION::SETTINGS_REGISTER_MODE_REGISTER_AND_LOGIN,
      "existing": SETTINGS_REGISTER_MODE_OPTION::SETTINGS_REGISTER_MODE_LOGIN,
      "disabled": SETTINGS_REGISTER_MODE_OPTION::SETTINGS_REGISTER_MODE_EXTERNAL
    })
end