feat: init roles + authorship detection

This commit is contained in:
swve 2023-11-27 22:16:22 +01:00
parent 38288e8a57
commit 0595bfdb3f
16 changed files with 109 additions and 236 deletions

View file

@ -214,7 +214,10 @@ async def get_orgs_by_user(
statement = (
select(Organization)
.join(UserOrganization)
.where(Organization.id == UserOrganization.org_id)
.where(
Organization.id == UserOrganization.org_id,
UserOrganization.user_id == user_id,
)
)
result = db_session.exec(statement)