[server] stick a _cw on internal connnection's user
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 20 Jul 2015 12:37:47 +0200
changeset 10539 08c5d26417f6
parent 10538 a2d2383612f3
child 10540 d2449691fd48
[server] stick a _cw on internal connnection's user Entity._fetch_restrictions goes through user._cw.vreg :( Closes #5705769
server/repository.py
--- a/server/repository.py	Mon Jul 20 16:43:47 2015 +0200
+++ b/server/repository.py	Mon Jul 20 12:37:47 2015 +0200
@@ -712,6 +712,8 @@
         """
         with Session(InternalManager(), self) as session:
             with session.new_cnx() as cnx:
+                cnx.user._cw = cnx  # XXX remove when "vreg = user._cw.vreg"
+                                    # hack in entity.py is gone
                 with cnx.security_enabled(read=False, write=False):
                     yield cnx