Fix logout type mismatch
This commit is contained in:
1 parent
5b6ed389c4
commit
ca59125a85
4 files changed
+12
-5
No files matched your search
@@ -50,7 +50,7 @@ async def get_flight(flight_id: str, user: UserDisplaySchema = Depends(get_curre
|
||||
:return: Flight details
|
||||
"""
|
||||
flight = await db.retrieve_flight(flight_id)
|
||||
if flight.user != user.id and AuthLevel(user.level) != AuthLevel.ADMIN:
|
||||
if str(flight.user) != user.id and AuthLevel(user.level) != AuthLevel.ADMIN:
|
||||
logger.info("Attempted access to unauthorized flight by %s", user.username)
|
||||
raise HTTPException(403, "Unauthorized access")
|
||||
|
||||
|
||||
Reference in new issue
Block a user