1
0
Fork 0
forked from sr2/cloud-api

feat: permission permissions

Orgs can only grant permissions to groups that they themselves have been granted access to.

Super admin bypasses not added, flagged as todos.
This commit is contained in:
Chris Milne 2026-06-16 13:51:31 +01:00
parent 0a867c9c90
commit 662b9c8e26
6 changed files with 71 additions and 4 deletions

View file

@ -55,6 +55,10 @@ class Organisation(Base):
"Contact", foreign_keys="Organisation.owner_contact_id"
)
permission_rel = relationship(
"Permission", secondary="org_permissions", back_populates="org_rel"
)
class OrgUsers(Base):
__tablename__ = "orgusers"