hooks/security.py
changeset 4003 b9436fe77c9e
parent 3890 d7a270f50f54
child 4048 12c4f7e2bed6
--- a/hooks/security.py	Thu Dec 03 17:17:43 2009 +0100
+++ b/hooks/security.py	Mon Dec 07 05:09:09 2009 -0800
@@ -119,7 +119,7 @@
                                            eidfrom=self.eidfrom,
                                            eidto=self.eidto)
             else:
-                rdef = rschema.rdef(session.describe(self.eidfrom)[0],
-                                    session.describe(self.eidto)[0])
-                rdef.check_perm(session, 'add', fromeid=self.eidfrom, toeid=self.eidto)
+                rdef = rschema.rdef(self._cw.describe(self.eidfrom)[0],
+                                    self._cw.describe(self.eidto)[0])
+                rdef.check_perm(self._cw, 'add', fromeid=self.eidfrom, toeid=self.eidto)