8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-25 00:13:45 +00:00

Fix changement de mdp

This commit is contained in:
Gabriel Detraz 2018-01-08 12:35:19 +01:00 committed by root
parent 01816813c4
commit d1d5efd590

View file

@ -385,7 +385,10 @@ class AclNode(Node):
def render(self, context):
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:
return self.oknodes.render(context)
return self.konodes.render(context)
@ -404,7 +407,10 @@ class AclInstanceNode(Node):
def render(self, context):
callback = get_callback(self.tag_name, self.instance.resolve(context))
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:
return self.oknodes.render(context)
return self.konodes.render(context)