mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-24 04:13:12 +00:00
Merge branch 'password_fix' into 'master'
Fix changement de mdp See merge request federez/re2o!60
This commit is contained in:
commit
9ee8d91489
1 changed files with 8 additions and 2 deletions
|
@ -385,6 +385,9 @@ 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]
|
||||||
|
if context['user'].is_anonymous():
|
||||||
|
can = False
|
||||||
|
else:
|
||||||
can, _ = self.callback(context['user'], *(resolved_args))
|
can, _ = self.callback(context['user'], *(resolved_args))
|
||||||
if can:
|
if can:
|
||||||
return self.oknodes.render(context)
|
return self.oknodes.render(context)
|
||||||
|
@ -404,6 +407,9 @@ 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]
|
||||||
|
if context['user'].is_anonymous():
|
||||||
|
can = False
|
||||||
|
else:
|
||||||
can, _ = callback(context['user'], *(resolved_args))
|
can, _ = callback(context['user'], *(resolved_args))
|
||||||
if can:
|
if can:
|
||||||
return self.oknodes.render(context)
|
return self.oknodes.render(context)
|
||||||
|
|
Loading…
Reference in a new issue