mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: init roles + authorship detection
This commit is contained in:
parent
38288e8a57
commit
0595bfdb3f
16 changed files with 109 additions and 236 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue