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
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user