Skip to content

Commit

Permalink
Update error class (#4006)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx authored Feb 19, 2025
1 parent 7c96b7f commit 353c185
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions backend/onyx/auth/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
from onyx.db.users import get_user_by_email
from onyx.redis.redis_pool import get_async_redis_connection
from onyx.redis.redis_pool import get_redis_client
from onyx.server.utils import BasicAuthenticationError
from onyx.utils.logger import setup_logger
from onyx.utils.telemetry import create_milestone_and_report
from onyx.utils.telemetry import optional_telemetry
Expand All @@ -109,11 +110,6 @@
logger = setup_logger()


class BasicAuthenticationError(HTTPException):
def __init__(self, detail: str):
super().__init__(status_code=status.HTTP_403_FORBIDDEN, detail=detail)


def is_user_admin(user: User | None) -> bool:
if AUTH_TYPE == AuthType.DISABLED:
return True
Expand Down

0 comments on commit 353c185

Please sign in to comment.