diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 25b573017b8..4d20330e0e2 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -54,10 +54,6 @@ Style/ClassEqualityComparison: - 'app/helpers/jsonld_helper.rb' - 'app/serializers/activitypub/outbox_serializer.rb' -Style/ClassVars: - Exclude: - - 'config/initializers/devise.rb' - # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowedVars. Style/FetchEnvVar: diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index f935090efc2..a95c7437fa0 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -38,42 +38,25 @@ Warden::Manager.before_logout do |_, warden| end module Devise - mattr_accessor :pam_authentication - @@pam_authentication = false - mattr_accessor :pam_controlled_service - @@pam_controlled_service = nil + mattr_accessor :pam_authentication, default: false + mattr_accessor :pam_controlled_service, default: nil - mattr_accessor :check_at_sign - @@check_at_sign = false + mattr_accessor :check_at_sign, default: false - mattr_accessor :ldap_authentication - @@ldap_authentication = false - mattr_accessor :ldap_host - @@ldap_host = nil - mattr_accessor :ldap_port - @@ldap_port = nil - mattr_accessor :ldap_method - @@ldap_method = nil - mattr_accessor :ldap_base - @@ldap_base = nil - mattr_accessor :ldap_uid - @@ldap_uid = nil - mattr_accessor :ldap_mail - @@ldap_mail = nil - mattr_accessor :ldap_bind_dn - @@ldap_bind_dn = nil - mattr_accessor :ldap_password - @@ldap_password = nil - mattr_accessor :ldap_tls_no_verify - @@ldap_tls_no_verify = false - mattr_accessor :ldap_search_filter - @@ldap_search_filter = nil - mattr_accessor :ldap_uid_conversion_enabled - @@ldap_uid_conversion_enabled = false - mattr_accessor :ldap_uid_conversion_search - @@ldap_uid_conversion_search = nil - mattr_accessor :ldap_uid_conversion_replace - @@ldap_uid_conversion_replace = nil + mattr_accessor :ldap_authentication, default: false + mattr_accessor :ldap_host, default: nil + mattr_accessor :ldap_port, default: nil + mattr_accessor :ldap_method, default: nil + mattr_accessor :ldap_base, default: nil + mattr_accessor :ldap_uid, default: nil + mattr_accessor :ldap_mail, default: nil + mattr_accessor :ldap_bind_dn, default: nil + mattr_accessor :ldap_password, default: nil + mattr_accessor :ldap_tls_no_verify, default: false + mattr_accessor :ldap_search_filter, default: nil + mattr_accessor :ldap_uid_conversion_enabled, default: false + mattr_accessor :ldap_uid_conversion_search, default: nil + mattr_accessor :ldap_uid_conversion_replace, default: nil module Strategies class PamAuthenticatable