feat: add access module boundary migrations

This commit is contained in:
2026-07-10 12:51:16 +02:00
parent 37828fe340
commit 04681f1d75
41 changed files with 7229 additions and 738 deletions

View File

@@ -18,6 +18,7 @@ from govoplan_access.backend.db.models import (
UserGroupMembership,
UserRoleAssignment,
)
from govoplan_access.backend.semantic import collect_function_roles
from govoplan_core.security.permissions import expand_scopes
from govoplan_core.security.time import ensure_aware_utc, utc_now
@@ -169,6 +170,8 @@ def collect_user_roles(session: Session, user: User) -> list[Role]:
)
for role in group_roles:
roles_by_id[role.id] = role
for role in collect_function_roles(session, user):
roles_by_id[role.id] = role
return list(roles_by_id.values())
@@ -218,4 +221,3 @@ def collect_tenant_memberships(session: Session, account: Account) -> list[tuple
.order_by(Tenant.name.asc())
.all()
)