|
|
@ -338,8 +338,9 @@ class AccountController < ApplicationController |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def redirect_if_password_change_not_allowed(user) |
|
|
|
def redirect_if_password_change_not_allowed(user) |
|
|
|
logger.warn "Password change for user '#{user}' forced, but user is not allowed to change password" |
|
|
|
|
|
|
|
if user and not user.change_password_allowed? |
|
|
|
if user and not user.change_password_allowed? |
|
|
|
|
|
|
|
logger.warn "Password change for user '#{user}' forced, but user is not allowed " + |
|
|
|
|
|
|
|
"to change password" |
|
|
|
flash[:error] = l(:notice_can_t_change_password) |
|
|
|
flash[:error] = l(:notice_can_t_change_password) |
|
|
|
redirect_to :action => 'login' |
|
|
|
redirect_to :action => 'login' |
|
|
|
return true |
|
|
|
return true |
|
|
|