[domainMW] set "acl_pass" variable into scope

This commit is contained in:
Maxime Alves LIRMM@home 2020-11-09 21:25:07 +01:00
parent 5d4b8d38b4
commit d4a6bb1a04
2 changed files with 3 additions and 0 deletions

View File

@ -125,6 +125,7 @@ def gen_router_routes(m_router: ModuleType, path: List[str]) -> Generator:
if not hasattr(m_router, 'ROUTES'):
logger.error(f'Missing *ROUTES* constant in *{m_router.__name__}*')
raise Exception(f'No ROUTES constant for {m_router.__name__}')
routes = m_router.ROUTES

View File

@ -48,6 +48,8 @@ def route_acl_decorator(fct: Callable, params: List[Dict]):
logger.debug(f'ACL OK for current route ({fct} - {param.get("acl")})')
req.scope['acl_pass'] = param['acl'].__name__
return await fct(
req, *args,
**{