document: richer eval() context for res_dirs.
authorP. Christeas <p_christ@hol.gr>
Wed, 27 Oct 2010 10:23:24 +0000 (13:23 +0300)
committerP. Christeas <p_christ@hol.gr>
Wed, 27 Oct 2010 10:23:24 +0000 (13:23 +0300)
We need to provide 'ctx' to the eval(), so that "uid" is defined in the
expression. Covers the case of user directories.

bzr revid: p_christ@hol.gr-20101027102324-ujy2293kpdzouna2

addons/document/nodes.py

index 3a3e6fa..eed424c 100644 (file)
@@ -791,7 +791,7 @@ class node_res_dir(node_class):
         ctx.update(self.dctx)
         where = []
         if self.domain:
-            app = safe_eval(self.domain, self.dctx)
+            app = safe_eval(self.domain, ctx)
             if not app:
                 pass
             elif isinstance(app, list):