[server/session] allow access to session id using sessionid
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Fri, 21 Jun 2013 15:47:01 +0200
changeset 9049 9d62d53b49df
parent 9048 8481fc6aa6dd
child 9050 635862b48485
[server/session] allow access to session id using sessionid session.sessionid is a DBAPISession attribute. Having it on server side session will helps the rework of the API to access repository. The new schema drop the concept of DBAPISession and use server side session for the same purpose. related to #2503918
server/session.py
--- a/server/session.py	Mon Jun 17 17:27:08 2013 +0200
+++ b/server/session.py	Fri Jun 21 15:47:01 2013 +0200
@@ -894,6 +894,10 @@
         return '<session %s (%s 0x%x)>' % (
             unicode(self.user.login), self.id, id(self))
 
+    @property
+    def sessionid(self):
+        return self.id
+
     def get_cnx(self, cnxid):
         """return the <cnxid> connection attached to this session