diff app/models/auth_source.rb @ 511:107d36338b70 live

Merge from branch "cannam"
author Chris Cannam
date Thu, 14 Jul 2011 10:43:07 +0100
parents 051f544170fe
children cbb26bc654de
line wrap: on
line diff
--- a/app/models/auth_source.rb	Thu Jun 09 16:51:06 2011 +0100
+++ b/app/models/auth_source.rb	Thu Jul 14 10:43:07 2011 +0100
@@ -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 @@
   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?