Revision 6874bbd9
Added by Paul Kelly about 14 years ago
- ID 6874bbd96a2988d324bee75a00c288211556ba40
app/models/auth_source.rb | ||
---|---|---|
"Abstract"
|
||
end
|
||
|
||
def to_label
|
||
if type_before_type_cast.empty?
|
||
logger.warn "Corrupt AuthSource! Record id:#{id} name:#{name} does not have an associated type. This may be due to importing a production database."
|
||
return nil
|
||
end
|
||
|
||
kind = type_before_type_cast.sub("AuthSource","")
|
||
"#{kind.upcase}-#{name}" if name
|
||
end
|
||
|
||
# By default a user may not set their password via Foreman
|
||
# An internal AuthSource should override this and provide a password mechanism
|
||
def can_set_password?
|
||
false
|
||
end
|
||
|
||
# Try to authenticate a user not yet registered against available sources
|
||
def self.authenticate(login, password)
|
||
AuthSource.find(:all).each do |source|
|
Also available in: Unified diff
Fixes #232 - Removes AS from Users page
The password verification test has not yet been implemented but will get done in AuthSourceInternal fix
All tests now pass These tests now work whether settings[:ldap] is enabled or not
Plus whitespace fix