Auth: Fix disable auth when checking for key permissions
Since authentication is disabled, remove the limited permissions for requests. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
f47d96790c
commit
4e808cbed7
1 changed files with 4 additions and 0 deletions
|
|
@ -84,6 +84,10 @@ def get_key_permission(request: Request):
|
|||
Internal only! Use the depends functions for incoming requests.
|
||||
"""
|
||||
|
||||
# Give full admin permissions if auth is disabled
|
||||
if DISABLE_AUTH:
|
||||
return "admin"
|
||||
|
||||
# Hyphens are okay here
|
||||
test_key = coalesce(
|
||||
request.headers.get("x-admin-key"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue