mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-14 15:57:27 +00:00
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:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user