Show More
@@ -56,10 +56,9 b'' | |||||
56 | ${h.checkbox('remember', value=True, checked=defaults.get('remember'))} |
|
56 | ${h.checkbox('remember', value=True, checked=defaults.get('remember'))} | |
57 | <label class="checkbox" for="remember">${_('Remember me')}</label> |
|
57 | <label class="checkbox" for="remember">${_('Remember me')}</label> | |
58 |
|
58 | |||
59 |
|
59 | %if h.HasPermissionAny('hg.password_reset.enabled')(): | ||
60 | %if h.HasPermissionAny('hg.password_reset.enable')(): |
|
|||
61 | <p class="links"> |
|
60 | <p class="links"> | |
62 | ${h.link_to(_('Forgot your password?'), h.route_path('reset_password'))} |
|
61 | ${h.link_to(_('Forgot your password?'), h.route_path('reset_password'), class_='pwd_reset')} | |
63 | </p> |
|
62 | </p> | |
64 | %elif h.HasPermissionAny('hg.password_reset.hidden')(): |
|
63 | %elif h.HasPermissionAny('hg.password_reset.hidden')(): | |
65 | <p class="help-block"> |
|
64 | <p class="help-block"> |
@@ -40,22 +40,22 b' class TestAdminPermissionsController(Tes' | |||||
40 | self.app.get(url('admin_permissions_application')) |
|
40 | self.app.get(url('admin_permissions_application')) | |
41 |
|
41 | |||
42 | @pytest.mark.parametrize( |
|
42 | @pytest.mark.parametrize( | |
43 | 'anonymous, default_register, default_register_message,' |
|
43 | 'anonymous, default_register, default_register_message, default_password_reset,' | |
44 | 'default_extern_activate, expect_error, expect_form_error', [ |
|
44 | 'default_extern_activate, expect_error, expect_form_error', [ | |
45 | (True, 'hg.register.none', '', 'hg.extern_activate.manual', |
|
45 | (True, 'hg.register.none', '', 'hg.password_reset.enabled', 'hg.extern_activate.manual', | |
46 | False, False), |
|
46 | False, False), | |
47 | (True, 'hg.register.manual_activate', '', 'hg.extern_activate.auto', |
|
47 | (True, 'hg.register.manual_activate', '', 'hg.password_reset.enabled', 'hg.extern_activate.auto', | |
48 | False, False), |
|
48 | False, False), | |
49 | (True, 'hg.register.auto_activate', '', 'hg.extern_activate.manual', |
|
49 | (True, 'hg.register.auto_activate', '', 'hg.password_reset.enabled', 'hg.extern_activate.manual', | |
50 | False, False), |
|
50 | False, False), | |
51 | (True, 'hg.register.auto_activate', '', 'hg.extern_activate.manual', |
|
51 | (True, 'hg.register.auto_activate', '', 'hg.password_reset.enabled', 'hg.extern_activate.manual', | |
52 | False, False), |
|
52 | False, False), | |
53 | (True, 'hg.register.XXX', '', 'hg.extern_activate.manual', |
|
53 | (True, 'hg.register.XXX', '', 'hg.password_reset.enabled', 'hg.extern_activate.manual', | |
54 | False, True), |
|
54 | False, True), | |
55 | (True, '', '', '', True, False), |
|
55 | (True, '', '', 'hg.password_reset.enabled', '', True, False), | |
56 | ]) |
|
56 | ]) | |
57 | def test_update_application_permissions( |
|
57 | def test_update_application_permissions( | |
58 | self, anonymous, default_register, default_register_message, |
|
58 | self, anonymous, default_register, default_register_message, default_password_reset, | |
59 | default_extern_activate, expect_error, expect_form_error): |
|
59 | default_extern_activate, expect_error, expect_form_error): | |
60 |
|
60 | |||
61 | self.log_user() |
|
61 | self.log_user() | |
@@ -66,6 +66,7 b' class TestAdminPermissionsController(Tes' | |||||
66 | 'anonymous': anonymous, |
|
66 | 'anonymous': anonymous, | |
67 | 'default_register': default_register, |
|
67 | 'default_register': default_register, | |
68 | 'default_register_message': default_register_message, |
|
68 | 'default_register_message': default_register_message, | |
|
69 | 'default_password_reset': default_password_reset, | |||
69 | 'default_extern_activate': default_extern_activate, |
|
70 | 'default_extern_activate': default_extern_activate, | |
70 | } |
|
71 | } | |
71 | response = self.app.post(url('admin_permissions_application'), |
|
72 | response = self.app.post(url('admin_permissions_application'), |
@@ -348,6 +348,7 b' class TestPermissions(object):' | |||||
348 | 'hg.create.none', |
|
348 | 'hg.create.none', | |
349 | 'hg.fork.none', |
|
349 | 'hg.fork.none', | |
350 | 'hg.register.manual_activate', |
|
350 | 'hg.register.manual_activate', | |
|
351 | 'hg.password_reset.enabled', | |||
351 | 'hg.extern_activate.auto', |
|
352 | 'hg.extern_activate.auto', | |
352 | 'repository.read', |
|
353 | 'repository.read', | |
353 | 'group.read', |
|
354 | 'group.read', | |
@@ -379,6 +380,7 b' class TestPermissions(object):' | |||||
379 | 'hg.create.repository', |
|
380 | 'hg.create.repository', | |
380 | 'hg.fork.repository', |
|
381 | 'hg.fork.repository', | |
381 | 'hg.register.manual_activate', |
|
382 | 'hg.register.manual_activate', | |
|
383 | 'hg.password_reset.enabled', | |||
382 | 'hg.extern_activate.auto', |
|
384 | 'hg.extern_activate.auto', | |
383 | 'repository.read', |
|
385 | 'repository.read', | |
384 | 'group.read', |
|
386 | 'group.read', | |
@@ -406,6 +408,7 b' class TestPermissions(object):' | |||||
406 | 'hg.create.none', |
|
408 | 'hg.create.none', | |
407 | 'hg.fork.none', |
|
409 | 'hg.fork.none', | |
408 | 'hg.register.manual_activate', |
|
410 | 'hg.register.manual_activate', | |
|
411 | 'hg.password_reset.enabled', | |||
409 | 'hg.extern_activate.auto', |
|
412 | 'hg.extern_activate.auto', | |
410 | 'repository.read', |
|
413 | 'repository.read', | |
411 | 'group.read', |
|
414 | 'group.read', |
General Comments 0
You need to be logged in to leave comments.
Login now