[server/session] add a login property
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 24 Jun 2013 18:00:20 +0200
changeset 9050 635862b48485
parent 9049 9d62d53b49df
child 9051 944d66870c6a
[server/session] add a login property session.login 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	Fri Jun 21 15:47:01 2013 +0200
+++ b/server/session.py	Mon Jun 24 18:00:20 2013 +0200
@@ -898,6 +898,11 @@
     def sessionid(self):
         return self.id
 
+    @property
+    def login(self):
+        # XXX backward compat with dbapi. deprecate me ASAP.
+        return self.user.login
+
     def get_cnx(self, cnxid):
         """return the <cnxid> connection attached to this session