Mercurial > libervia-web
diff src/server/session_iface.py @ 1101:9f7a628ce893
server (session): new "guest" property, True when connected user is a guest
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 01 Jun 2018 18:32:39 +0200 |
parents | 8a270f32de81 |
children | cdd389ef97bc |
line wrap: on
line diff
--- a/src/server/session_iface.py Fri Jun 01 18:31:29 2018 +0200 +++ b/src/server/session_iface.py Fri Jun 01 18:32:39 2018 +0200 @@ -59,6 +59,14 @@ def connected(self): return self.profile is not None + @property + def guest(self): + """True if this is a guest session""" + if self.profile is None: + return False + else: + return self.profile.startswith('guest@@') + def getPageData(self, page, key): """get session data for a page