resurrect code lost by too much patch manipulation
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 10 May 2011 18:17:55 +0200
changeset 7356 73d7863d97c1
parent 7355 a27d5ddd5dff
child 7358 5a56890b33df
resurrect code lost by too much patch manipulation
devtools/fake.py
--- a/devtools/fake.py	Tue May 10 16:23:48 2011 +0200
+++ b/devtools/fake.py	Tue May 10 18:17:55 2011 +0200
@@ -138,8 +138,6 @@
 
 
 class FakeSession(RequestSessionBase):
-    read_security = write_security = True
-    set_read_security = set_write_security = lambda *args, **kwargs: None
 
     def __init__(self, repo=None, user=None):
         self.repo = repo
@@ -162,6 +160,13 @@
     def set_entity_cache(self, entity):
         pass
 
+    # for use with enabled_security context manager
+    read_security = write_security = True
+    def init_security(self, *args):
+        return None, None
+    def reset_security(self, *args):
+        return
+
 class FakeRepo(object):
     querier = None
     def __init__(self, schema, vreg=None, config=None):