[0.2.1] Allows route parameters without acls. The route is deactivated.
This commit is contained in:
parent
3530f53820
commit
d93fb23bba
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
__version__ = '0.2.0'
|
__version__ = '0.2.1'
|
||||||
|
|
||||||
def version():
|
def version():
|
||||||
return f'HalfAPI version:{__version__}'
|
return f'HalfAPI version:{__version__}'
|
||||||
|
@ -44,7 +44,7 @@ def route_acl_decorator(fct: Callable, acls_mod, params: List[Dict]):
|
|||||||
@wraps(fct)
|
@wraps(fct)
|
||||||
async def caller(req: Request, *args, **kwargs):
|
async def caller(req: Request, *args, **kwargs):
|
||||||
for param in params:
|
for param in params:
|
||||||
if param['acl'](req, *args, **kwargs):
|
if param.get('acl') and param['acl'](req, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
We merge the 'acl' and 'keys' kwargs values to let the
|
We merge the 'acl' and 'keys' kwargs values to let the
|
||||||
decorated function know which ACL function answered
|
decorated function know which ACL function answered
|
||||||
|
Loading…
Reference in New Issue
Block a user