[domainMW] set "acl_pass" variable into scope
This commit is contained in:
parent
5d4b8d38b4
commit
d4a6bb1a04
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
**{
|
||||
|
|
Loading…
Reference in New Issue