Commit ed905e41 authored by Gabriel Detraz's avatar Gabriel Detraz Committed by root

Fix changement de mdp

parent 99c69a5d
...@@ -385,7 +385,10 @@ class AclNode(Node): ...@@ -385,7 +385,10 @@ class AclNode(Node):
def render(self, context): def render(self, context):
resolved_args = [arg.resolve(context) for arg in self.args] resolved_args = [arg.resolve(context) for arg in self.args]
can, _ = self.callback(context['user'], *(resolved_args)) if context['user'].is_anonymous():
can = False
else:
can, _ = self.callback(context['user'], *(resolved_args))
if can: if can:
return self.oknodes.render(context) return self.oknodes.render(context)
return self.konodes.render(context) return self.konodes.render(context)
...@@ -404,7 +407,10 @@ class AclInstanceNode(Node): ...@@ -404,7 +407,10 @@ class AclInstanceNode(Node):
def render(self, context): def render(self, context):
callback = get_callback(self.tag_name, self.instance.resolve(context)) callback = get_callback(self.tag_name, self.instance.resolve(context))
resolved_args = [arg.resolve(context) for arg in self.args] resolved_args = [arg.resolve(context) for arg in self.args]
can, _ = callback(context['user'], *(resolved_args)) if context['user'].is_anonymous():
can = False
else:
can, _ = callback(context['user'], *(resolved_args))
if can: if can:
return self.oknodes.render(context) return self.oknodes.render(context)
return self.konodes.render(context) return self.konodes.render(context)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment