several minor fixes

This commit is contained in:
Jörn-Michael Miehe 2022-03-29 15:56:05 +00:00
parent ec0f7890ef
commit 0c8298871f
2 changed files with 2 additions and 1 deletions

View file

@ -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()
)

View file

@ -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