Allow AuthSources to control if they allow password changes.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3745 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-05-23 03:16:37 +00:00
parent 715c9d16ef
commit 908d44519c
5 changed files with 50 additions and 5 deletions
+9
View File
@@ -32,6 +32,15 @@ class AuthSource < ActiveRecord::Base
"Abstract"
end
def allow_password_changes?
self.class.allow_password_changes?
end
# Does this auth source backend allow password changes?
def self.allow_password_changes?
false
end
# Try to authenticate a user not yet registered against available sources
def self.authenticate(login, password)
AuthSource.find(:all, :conditions => ["onthefly_register=?", true]).each do |source|