comparison src/server/session_iface.py @ 1094:8a270f32de81

server (session): new "connected" property, which is True when a user is logged
author Goffi <goffi@goffi.org>
date Fri, 01 Jun 2018 13:04:51 +0200
parents eda7a1c6532a
children 9f7a628ce893
comparison
equal deleted inserted replaced
1093:eda7a1c6532a 1094:8a270f32de81
52 @property 52 @property
53 def cache_dir(self): 53 def cache_dir(self):
54 if self.profile is None: 54 if self.profile is None:
55 return self.service_cache_url + u'/' 55 return self.service_cache_url + u'/'
56 return os.path.join(u'/', C.CACHE_DIR, self.uuid) + u'/' 56 return os.path.join(u'/', C.CACHE_DIR, self.uuid) + u'/'
57
58 @property
59 def connected(self):
60 return self.profile is not None
57 61
58 def getPageData(self, page, key): 62 def getPageData(self, page, key):
59 """get session data for a page 63 """get session data for a page
60 64
61 @param page(LiberviaPage): instance of the page 65 @param page(LiberviaPage): instance of the page