Option to force a user to change his password (#3872).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12081 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
bd4fba08e5
commit
b764e39847
10 files changed
+78
-6
No files matched your search
@@ -280,6 +280,10 @@ class User < Principal
|
||||
return auth_source.allow_password_changes?
|
||||
end
|
||||
|
||||
def must_change_password?
|
||||
must_change_passwd? && change_password_allowed?
|
||||
end
|
||||
|
||||
def generate_password?
|
||||
generate_password == '1' || generate_password == true
|
||||
end
|
||||
@@ -568,6 +572,7 @@ class User < Principal
|
||||
safe_attributes 'status',
|
||||
'auth_source_id',
|
||||
'generate_password',
|
||||
'must_change_passwd',
|
||||
:if => lambda {|user, current_user| current_user.admin?}
|
||||
|
||||
safe_attributes 'group_ids',
|
||||
|
||||
Reference in new issue
Block a user