[acl decorator] when check flag is activated, returns a 200 status code with empty body if no acl has passed
check function should always return 200. If we don't do this, we can't see the difference between a "refused" call and a "refused" check
This commit is contained in:
parent
8ca94ab7ed
commit
e0b06f51d5
|
@ -84,6 +84,9 @@ def route_acl_decorator(fct: Callable = None, params: List[Dict] = []):
|
|||
**param
|
||||
})
|
||||
|
||||
if 'check' in req.query_params:
|
||||
return PlainTextResponse('')
|
||||
|
||||
raise HTTPException(401)
|
||||
|
||||
return caller
|
||||
|
|
Loading…
Reference in New Issue