# HG changeset patch # User Sylvain Thénault # Date 1269424802 -3600 # Node ID ec93dd82c83f64cb2c9f8920d44d853e1b4fdd86 # Parent c4ef22c85d167ac54c94c279c935e78af5bdb16c [repo] fix warning message and implementation of bw compat unsafe_execute diff -r c4ef22c85d16 -r ec93dd82c83f server/session.py --- a/server/session.py Wed Mar 24 10:23:57 2010 +0100 +++ b/server/session.py Wed Mar 24 11:00:02 2010 +0100 @@ -885,13 +885,15 @@ # deprecated ############################################################### - @deprecated("[3.7] control security with session.[read|write]_security") + @deprecated("[3.7] execute is now unsafe by default in hooks/operation. You" + " can also control security with session.[read|write]_security") def unsafe_execute(self, rql, kwargs=None, eid_key=None, build_descr=True, propagate=False): """like .execute but with security checking disabled (this method is internal to the server, it's not part of the db-api) """ - return self.execute(rql, kwargs, eid_key, build_descr) + with security_enabled(self, read=False, write=False): + return self.execute(rql, kwargs, eid_key, build_descr) @property @deprecated("[3.7] is_super_session is deprecated, test "