From 96c48a7f2d3a8fa36f44d5806a14003e40cc4807 Mon Sep 17 00:00:00 2001 From: Albrecht Degering Date: Tue, 8 Sep 2026 12:19:37 +0200 Subject: [PATCH] refactor(committee): reuse exact Core actor selection contract Release v0.1.22. Coordinated integrity review: GovOPlaN/govoplan-core#298. --- package.json | 2 +- pyproject.toml | 4 ++-- src/govoplan_committee/backend/manifest.py | 2 +- src/govoplan_committee/backend/workspace.py | 15 +-------------- webui/package.json | 2 +- 5 files changed, 6 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index d552656..f5675ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@govoplan/committee-webui", - "version": "0.1.21", + "version": "0.1.22", "private": true, "description": "GovOPlaN Committee platform module seed.", "type": "module", diff --git a/pyproject.toml b/pyproject.toml index 09fbd4c..9f21a2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta" [project] name = "govoplan-committee" -version = "0.1.21" +version = "0.1.22" description = "GovOPlaN committee governance and formal-decision integration module." readme = "README.md" requires-python = ">=3.12" license = { file = "LICENSE" } authors = [{ name = "GovOPlaN" }] dependencies = [ - "govoplan-core>=0.1.18", + "govoplan-core>=0.1.46", "govoplan-access>=0.1.18", ] diff --git a/src/govoplan_committee/backend/manifest.py b/src/govoplan_committee/backend/manifest.py index 813ad9f..79f446a 100644 --- a/src/govoplan_committee/backend/manifest.py +++ b/src/govoplan_committee/backend/manifest.py @@ -59,7 +59,7 @@ from govoplan_core.db.base import Base MODULE_ID = "committee" MODULE_NAME = "Committee" -MODULE_VERSION = "0.1.21" +MODULE_VERSION = "0.1.22" READ_SCOPE = "committee:workspace:read" WRITE_SCOPE = "committee:workspace:write" BALLOT_SCOPE = "committee:ballot:finalize" diff --git a/src/govoplan_committee/backend/workspace.py b/src/govoplan_committee/backend/workspace.py index 0f8bfcb..1c93433 100644 --- a/src/govoplan_committee/backend/workspace.py +++ b/src/govoplan_committee/backend/workspace.py @@ -11,6 +11,7 @@ import uuid from sqlalchemy import func from sqlalchemy.orm import Session +from govoplan_core.core.principal_helpers import principal_user_first_actor as _principal_actor from govoplan_core.core.events import ( EventActorRef, EventObjectRef, @@ -1001,20 +1002,6 @@ def _principal_tenant(principal: object) -> str: return tenant_id -def _principal_actor(principal: object) -> str | None: - user = getattr(principal, "user", None) - for value in ( - getattr(user, "id", None), - getattr(principal, "account_id", None), - getattr(principal, "identity_id", None), - getattr(principal, "membership_id", None), - ): - candidate = str(value or "").strip() - if candidate: - return candidate - return None - - def _session(value: object) -> Session: if not hasattr(value, "query"): raise InstitutionalContextError( diff --git a/webui/package.json b/webui/package.json index 05036ce..1652e21 100644 --- a/webui/package.json +++ b/webui/package.json @@ -1,6 +1,6 @@ { "name": "@govoplan/committee-webui", - "version": "0.1.21", + "version": "0.1.22", "private": true, "type": "module", "main": "src/index.ts",