From a78d5659593d9fcce02a24a95c0ca0d111706465 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 26 Feb 2011 13:09:25 +0000 Subject: 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 --- app/models/auth_source.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/models/auth_source.rb') 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? -- cgit v1.2.3