several minor fixes
This commit is contained in:
parent
ec0f7890ef
commit
0c8298871f
2 changed files with 2 additions and 1 deletions
|
@ -184,6 +184,7 @@ class User(UserBase, table=True):
|
|||
|
||||
return (
|
||||
capability in self.get_capabilities()
|
||||
# admin can do everything
|
||||
or UserCapabilityType.admin in self.get_capabilities()
|
||||
)
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ async def get_current_user_if_exists(
|
|||
|
||||
# fail if not requested by a user
|
||||
if current_user is None:
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
|
||||
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND)
|
||||
|
||||
return current_user
|
||||
|
||||
|
|
Loading…
Reference in a new issue