diff app/models/.svn/text-base/auth_source.rb.svn-base @ 245:051f544170fe

* Update to SVN trunk revision 4993
author Chris Cannam
date Thu, 03 Mar 2011 11:42:28 +0000
parents 513646585e45
children
line wrap: on
line diff
--- a/app/models/.svn/text-base/auth_source.rb.svn-base	Thu Mar 03 11:40:10 2011 +0000
+++ b/app/models/.svn/text-base/auth_source.rb.svn-base	Thu Mar 03 11:42:28 2011 +0000
@@ -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?