Mercurial > libervia-web
diff libervia/server/pages.py @ 1266:6b7f9c3558cc
server, pages: better identities handling:
- own identity is now retrieve on connection
- use session identities all the time, fixed pages where an empty dict was used
- identities and own_jid are alway set in template_data for normal rendering
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 19 May 2020 11:02:32 +0200 |
parents | 92ff09cdd6dd |
children | b5f920845d34 |
line wrap: on
line diff
--- a/libervia/server/pages.py Tue May 19 11:02:31 2020 +0200 +++ b/libervia/server/pages.py Tue May 19 11:02:32 2020 +0200 @@ -1308,11 +1308,14 @@ # if confirm variable is set in case of successfuly data post session_data = self.host.getSessionData(request, session_iface.ISATSession) + template_data['identities'] = session_data.identities if session_data.popPageFlag(self, C.FLAG_CONFIRM): template_data["confirm"] = True notifs = session_data.popPageNotifications(self) if notifs: template_data["notifications"] = notifs + if session_data.jid is not None: + template_data["own_jid"] = session_data.jid if session_data.locale is not None: template_data['locale'] = session_data.locale if self.vhost_root.site_name: