hooks/security.py
changeset 4003 b9436fe77c9e
parent 3890 d7a270f50f54
child 4048 12c4f7e2bed6
equal deleted inserted replaced
3998:94cc7cad3d2d 4003:b9436fe77c9e
   117                 _CheckRelationPermissionOp(self._cw, action='add',
   117                 _CheckRelationPermissionOp(self._cw, action='add',
   118                                            rschema=rschema,
   118                                            rschema=rschema,
   119                                            eidfrom=self.eidfrom,
   119                                            eidfrom=self.eidfrom,
   120                                            eidto=self.eidto)
   120                                            eidto=self.eidto)
   121             else:
   121             else:
   122                 rdef = rschema.rdef(session.describe(self.eidfrom)[0],
   122                 rdef = rschema.rdef(self._cw.describe(self.eidfrom)[0],
   123                                     session.describe(self.eidto)[0])
   123                                     self._cw.describe(self.eidto)[0])
   124                 rdef.check_perm(session, 'add', fromeid=self.eidfrom, toeid=self.eidto)
   124                 rdef.check_perm(self._cw, 'add', fromeid=self.eidfrom, toeid=self.eidto)
   125 
   125