server/session.py
branchstable
changeset 4987 ec93dd82c83f
parent 4924 d2fc161bee3f
child 4992 398cc8b39aec
equal deleted inserted replaced
4986:c4ef22c85d16 4987:ec93dd82c83f
   883             description.append(tuple(row_descr))
   883             description.append(tuple(row_descr))
   884         return description
   884         return description
   885 
   885 
   886     # deprecated ###############################################################
   886     # deprecated ###############################################################
   887 
   887 
   888     @deprecated("[3.7] control security with session.[read|write]_security")
   888     @deprecated("[3.7] execute is now unsafe by default in hooks/operation. You"
       
   889                 " can also control security with session.[read|write]_security")
   889     def unsafe_execute(self, rql, kwargs=None, eid_key=None, build_descr=True,
   890     def unsafe_execute(self, rql, kwargs=None, eid_key=None, build_descr=True,
   890                        propagate=False):
   891                        propagate=False):
   891         """like .execute but with security checking disabled (this method is
   892         """like .execute but with security checking disabled (this method is
   892         internal to the server, it's not part of the db-api)
   893         internal to the server, it's not part of the db-api)
   893         """
   894         """
   894         return self.execute(rql, kwargs, eid_key, build_descr)
   895         with security_enabled(self, read=False, write=False):
       
   896             return self.execute(rql, kwargs, eid_key, build_descr)
   895 
   897 
   896     @property
   898     @property
   897     @deprecated("[3.7] is_super_session is deprecated, test "
   899     @deprecated("[3.7] is_super_session is deprecated, test "
   898                 "session.read_security and or session.write_security")
   900                 "session.read_security and or session.write_security")
   899     def is_super_session(self):
   901     def is_super_session(self):