Show More
@@ -30,6 +30,7 b' from recaptcha.client.captcha import sub' | |||
|
30 | 30 | |
|
31 | 31 | from rhodecode.authentication.base import authenticate, HTTP_TYPE |
|
32 | 32 | from rhodecode.events import UserRegistered |
|
33 | from rhodecode.lib import helpers as h | |
|
33 | 34 | from rhodecode.lib.auth import ( |
|
34 | 35 | AuthUser, HasPermissionAnyDecorator, CSRFRequired) |
|
35 | 36 | from rhodecode.lib.base import get_ip_addr |
@@ -285,6 +286,12 b' class LoginView(object):' | |||
|
285 | 286 | try: |
|
286 | 287 | form_result = password_reset_form.to_python( |
|
287 | 288 | self.request.params) |
|
289 | if h.HasPermissionAny('hg.password_reset.disabled')(): | |
|
290 | log.error('Failed attempt to reset password for %s.', form_result['email'] ) | |
|
291 | self.session.flash( | |
|
292 | _('Password reset has been disabled.'), | |
|
293 | queue='error') | |
|
294 | return HTTPFound(self.request.route_path('reset_password')) | |
|
288 | 295 | if captcha_active: |
|
289 | 296 | response = submit( |
|
290 | 297 | self.request.params.get('recaptcha_challenge_field'), |
General Comments 0
You need to be logged in to leave comments.
Login now