Mercurial > libervia-web
comparison libervia/pages/login/page_meta.py @ 1506:ce879da7fcf7
server: fix `on_signal` callback
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 23 Mar 2023 17:50:54 +0100 |
parents | 409d10211b20 |
children | 106bae41f5c8 |
comparison
equal
deleted
inserted
replaced
1505:a169cbc315f0 | 1506:ce879da7fcf7 |
---|---|
24 profile = self.getProfile(request) | 24 profile = self.getProfile(request) |
25 if profile is not None: | 25 if profile is not None: |
26 self.pageRedirect("/login/logged", request) | 26 self.pageRedirect("/login/logged", request) |
27 | 27 |
28 # login error message | 28 # login error message |
29 session_data = self.host.getSessionData(request, session_iface.ISATSession) | 29 session_data = self.host.getSessionData(request, session_iface.IWebSession) |
30 login_error = session_data.popPageData(self, "login_error") | 30 login_error = session_data.popPageData(self, "login_error") |
31 if login_error is not None: | 31 if login_error is not None: |
32 template_data["S_C"] = C # we need server constants in template | 32 template_data["S_C"] = C # we need server constants in template |
33 template_data["login_error"] = login_error | 33 template_data["login_error"] = login_error |
34 template_data["empty_password_allowed"] = bool( | 34 template_data["empty_password_allowed"] = bool( |
47 """set login_error in page data | 47 """set login_error in page data |
48 | 48 |
49 @param error_const(unicode): one of login error constant | 49 @param error_const(unicode): one of login error constant |
50 @return C.POST_NO_CONFIRM: avoid confirm message | 50 @return C.POST_NO_CONFIRM: avoid confirm message |
51 """ | 51 """ |
52 session_data = self.host.getSessionData(request, session_iface.ISATSession) | 52 session_data = self.host.getSessionData(request, session_iface.IWebSession) |
53 session_data.setPageData(self, "login_error", error_const) | 53 session_data.setPageData(self, "login_error", error_const) |
54 return C.POST_NO_CONFIRM | 54 return C.POST_NO_CONFIRM |
55 | 55 |
56 | 56 |
57 async def on_data_post(self, request): | 57 async def on_data_post(self, request): |