feat(poll): enforce governed participation ownership

This commit is contained in:
2026-07-21 21:17:04 +02:00
parent f839545605
commit 156486fcee
13 changed files with 3515 additions and 53 deletions

View File

@@ -4,6 +4,7 @@ import unittest
from govoplan_core.core.modules import ModuleManifest
from govoplan_poll.backend.manifest import get_manifest
from govoplan_poll.backend.participation import CAPABILITY_POLL_PARTICIPATION_GATEWAY
class PollManifestTests(unittest.TestCase):
@@ -21,6 +22,9 @@ class PollManifestTests(unittest.TestCase):
self.assertIn("poll.availability_matrix", {interface.name for interface in manifest.provides_interfaces})
self.assertIn("poll.workflow_context", {interface.name for interface in manifest.provides_interfaces})
self.assertIn("poll.signed_participation", {interface.name for interface in manifest.provides_interfaces})
self.assertIn("poll.governed_participation", {interface.name for interface in manifest.provides_interfaces})
self.assertIn(CAPABILITY_POLL_PARTICIPATION_GATEWAY, manifest.capability_factories)
self.assertEqual(manifest.version, "0.1.10")
self.assertIn("poll:response:write", {permission.scope for permission in manifest.permissions})

File diff suppressed because it is too large Load Diff

View File

@@ -22,6 +22,7 @@ from govoplan_poll.backend.service import (
create_poll,
create_poll_invitation,
open_poll,
poll_owner_ref,
poll_result_summary_by_id,
submit_poll_response,
submit_poll_response_with_token,
@@ -172,6 +173,11 @@ class PollServiceTests(unittest.TestCase):
],
options=[PollOptionInput(key="slot-1", label="Monday")],
),
mutation_owner=poll_owner_ref(
module_id="scheduling",
resource_type="scheduling_request",
resource_id="request-1",
),
)
self.assertEqual(poll.context_module, "scheduling")