diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-02-26 13:09:25 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-02-26 13:09:25 +0000 |
commit | a78d5659593d9fcce02a24a95c0ca0d111706465 (patch) | |
tree | 6b729c9b4f6d1413af78c5fe59a2a29bbc954b44 /app/models/auth_source.rb | |
parent | e1ad561cf652713bbdebe2d60fc4c680fb367ec1 (diff) | |
download | redmine-a78d5659593d9fcce02a24a95c0ca0d111706465.tar.gz redmine-a78d5659593d9fcce02a24a95c0ca0d111706465.zip |
Adds support for SCM/LDAP passwords encryption in the database (#7411).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4950 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/auth_source.rb')
-rw-r--r-- | app/models/auth_source.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/auth_source.rb b/app/models/auth_source.rb index 84f17b1bc..e9922ca56 100644 --- a/app/models/auth_source.rb +++ b/app/models/auth_source.rb @@ -16,6 +16,8 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class AuthSource < ActiveRecord::Base + include Redmine::Ciphering + has_many :users validates_presence_of :name @@ -31,6 +33,14 @@ class AuthSource < ActiveRecord::Base def auth_method_name "Abstract" end + + def account_password + read_ciphered_attribute(:account_password) + end + + def account_password=(arg) + write_ciphered_attribute(:account_password, arg) + end def allow_password_changes? self.class.allow_password_changes? |