Resolve public poll invitations to tenant policy

This commit is contained in:
2026-08-04 09:29:36 +02:00
parent 5e9aa58eda
commit 3c126a7ee1
5 changed files with 53 additions and 1 deletions
+23
View File
@@ -32,6 +32,7 @@ from govoplan_poll.backend.participation import (
PollInvitationRevocationRef,
PollOptionMutationRef,
PollParticipationContextRef,
PollPublicInvitationRef,
PollResponseGatewayRef,
)
from govoplan_poll.backend.participation_service import (
@@ -323,6 +324,28 @@ class SqlPollSchedulingProvider(PollSchedulingProvider):
except (PollError, ValidationError) as exc:
raise PollCapabilityError(str(exc)) from exc
def resolve_public_invitation(
self,
session: object,
*,
token: str,
gateway: PollResponseGatewayRef,
) -> PollPublicInvitationRef:
try:
invitation = governed_invitation(
session,
token=token,
gateway=gateway,
)
except (PollError, ValidationError) as exc:
raise PollCapabilityError(str(exc)) from exc
return PollPublicInvitationRef(
invitation_id=invitation.id,
tenant_id=invitation.tenant_id,
poll_id=invitation.poll_id,
gateway=gateway,
)
def submit_governed_response(
self,
session: object,