diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-05-23 03:16:37 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-05-23 03:16:37 +0000 |
commit | 908d44519c410db2ef841c72e501a6c198051b43 (patch) | |
tree | d3cdca7c8028f2ad4c9842f1cce683d9304862d8 /app/models/auth_source.rb | |
parent | 715c9d16ef2c2effbc614dace8b50d145e703b80 (diff) | |
download | redmine-908d44519c410db2ef841c72e501a6c198051b43.tar.gz redmine-908d44519c410db2ef841c72e501a6c198051b43.zip |
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
Diffstat (limited to 'app/models/auth_source.rb')
-rw-r--r-- | app/models/auth_source.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/auth_source.rb b/app/models/auth_source.rb index 537ed2d43..84f17b1bc 100644 --- a/app/models/auth_source.rb +++ b/app/models/auth_source.rb @@ -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| |