--- a/server/session.py Thu May 19 16:39:24 2011 +0200
+++ b/server/session.py Thu May 19 18:48:26 2011 +0200
@@ -458,6 +458,9 @@
DEFAULT_SECURITY = object() # evaluated to true by design
+ def security_enabled(self, read=False, write=False):
+ return security_enabled(self, read=read, write=write)
+
def init_security(self, read, write):
if read is None:
oldread = None
@@ -566,6 +569,11 @@
HOOKS_ALLOW_ALL = object()
HOOKS_DENY_ALL = object()
+ def allow_all_hooks_but(self, *categories):
+ return hooks_control(self, self.HOOKS_ALLOW_ALL, *categories)
+ def deny_all_hooks_but(self, *categories):
+ return hooks_control(self, self.HOOKS_DENY_ALL, *categories)
+
@property
def hooks_mode(self):
return getattr(self._threaddata, 'hooks_mode', self.HOOKS_ALLOW_ALL)