Initdb: create database schemas, admin role, initial background map
All checks were successful
/ test (push) Successful in 32s

This commit is contained in:
phil 2024-12-20 11:45:44 +01:00
parent e44911db8e
commit 7354b9bab8
6 changed files with 76 additions and 47 deletions

View file

@ -115,7 +115,7 @@ async def get_acls(
db_session: db_session, user: Annotated[User, Depends(get_current_active_user)]
) -> list[UserRoleLink]:
"""New: ACLs returned as UserRoleLink"""
if user is not None or not user.has_role("manager"):
if user is None or not user.has_role("manager"):
raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED)
data = await db_session.exec(select(UserRoleLink))
return data.all() # type: ignore[return-value]