--- a/cubicweb/repoapi.py Wed Mar 09 14:11:47 2016 +0100
+++ b/cubicweb/repoapi.py Thu Jun 12 15:54:44 2014 +0200
@@ -47,11 +47,7 @@
"""Take credential and return associated Connection.
raise AuthenticationError if the credential are invalid."""
- sessionid = repo.connect(login, **kwargs)
- session = repo._get_session(sessionid)
- # XXX the autoclose_session should probably be handle on the session directly
- # this is something to consider once we have proper server side Connection.
- return Connection(session)
+ return repo.new_session(login, **kwargs).new_cnx()
def anonymous_cnx(repo):
"""return a Connection for Anonymous user.