comparison libervia/pages/login/page_meta.py @ 1404:6a35167a4e2c

pages (login, register): fix `allow_registration`: if `allow_registration` is false: - `register_url` is not set in login page - register page returns HTTP_FORBIDDEN
author Goffi <goffi@goffi.org>
date Fri, 16 Apr 2021 18:38:45 +0200
parents 24e2973378f6
children 409d10211b20
comparison
equal deleted inserted replaced
1403:1357d04107d1 1404:6a35167a4e2c
34 template_data["empty_password_allowed"] = bool( 34 template_data["empty_password_allowed"] = bool(
35 self.host.options["empty_password_allowed_warning_dangerous_list"] 35 self.host.options["empty_password_allowed_warning_dangerous_list"]
36 ) 36 )
37 37
38 # register page url 38 # register page url
39 template_data["register_url"] = self.getPageRedirectURL(request, "register") 39 if self.host.options["allow_registration"]:
40 template_data["register_url"] = self.getPageRedirectURL(request, "register")
40 41
41 #  if login is set, we put it in template to prefill field 42 #  if login is set, we put it in template to prefill field
42 template_data["login"] = session_data.popPageData(self, "login") 43 template_data["login"] = session_data.popPageData(self, "login")
43 44
44 45