mirror of
https://github.com/redmine/redmine.git
synced 2026-07-07 20:43:39 +02:00
rubocop: fix Lint/IneffectiveAccessModifier in app/models/auth_source_ldap.rb (#32470)
git-svn-id: http://svn.redmine.org/redmine/trunk@19085 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -390,10 +390,6 @@ Lint/HandleExceptions:
|
||||
- 'lib/redmine/scm/adapters/cvs_adapter.rb'
|
||||
- 'lib/redmine/scm/adapters/subversion_adapter.rb'
|
||||
|
||||
Lint/IneffectiveAccessModifier:
|
||||
Exclude:
|
||||
- 'app/models/auth_source_ldap.rb'
|
||||
|
||||
Lint/InterpolationCheck:
|
||||
Exclude:
|
||||
- 'app/models/user.rb'
|
||||
|
||||
@@ -244,10 +244,13 @@ class AuthSourceLdap < AuthSource
|
||||
attrs
|
||||
end
|
||||
|
||||
def self.get_attr(entry, attr_name)
|
||||
if !attr_name.blank?
|
||||
value = entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name]
|
||||
value.to_s.force_encoding('UTF-8')
|
||||
# Singleton class method is public
|
||||
class << self
|
||||
def get_attr(entry, attr_name)
|
||||
if !attr_name.blank?
|
||||
value = entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name]
|
||||
value.to_s.force_encoding('UTF-8')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user