refactor(committee): reuse exact Core actor selection contract
Module Package Release / publish-packages (push) Successful in 13s

Release v0.1.22. Coordinated integrity review: GovOPlaN/govoplan-core#298.
This commit is contained in:
2026-09-08 12:19:37 +02:00
parent 7c2ec4ec17
commit 96c48a7f2d
5 changed files with 6 additions and 19 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@govoplan/committee-webui", "name": "@govoplan/committee-webui",
"version": "0.1.21", "version": "0.1.22",
"private": true, "private": true,
"description": "GovOPlaN Committee platform module seed.", "description": "GovOPlaN Committee platform module seed.",
"type": "module", "type": "module",
+2 -2
View File
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "govoplan-committee" name = "govoplan-committee"
version = "0.1.21" version = "0.1.22"
description = "GovOPlaN committee governance and formal-decision integration module." description = "GovOPlaN committee governance and formal-decision integration module."
readme = "README.md" readme = "README.md"
requires-python = ">=3.12" requires-python = ">=3.12"
license = { file = "LICENSE" } license = { file = "LICENSE" }
authors = [{ name = "GovOPlaN" }] authors = [{ name = "GovOPlaN" }]
dependencies = [ dependencies = [
"govoplan-core>=0.1.18", "govoplan-core>=0.1.46",
"govoplan-access>=0.1.18", "govoplan-access>=0.1.18",
] ]
+1 -1
View File
@@ -59,7 +59,7 @@ from govoplan_core.db.base import Base
MODULE_ID = "committee" MODULE_ID = "committee"
MODULE_NAME = "Committee" MODULE_NAME = "Committee"
MODULE_VERSION = "0.1.21" MODULE_VERSION = "0.1.22"
READ_SCOPE = "committee:workspace:read" READ_SCOPE = "committee:workspace:read"
WRITE_SCOPE = "committee:workspace:write" WRITE_SCOPE = "committee:workspace:write"
BALLOT_SCOPE = "committee:ballot:finalize" BALLOT_SCOPE = "committee:ballot:finalize"
+1 -14
View File
@@ -11,6 +11,7 @@ import uuid
from sqlalchemy import func from sqlalchemy import func
from sqlalchemy.orm import Session 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 ( from govoplan_core.core.events import (
EventActorRef, EventActorRef,
EventObjectRef, EventObjectRef,
@@ -1001,20 +1002,6 @@ def _principal_tenant(principal: object) -> str:
return tenant_id 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: def _session(value: object) -> Session:
if not hasattr(value, "query"): if not hasattr(value, "query"):
raise InstitutionalContextError( raise InstitutionalContextError(
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@govoplan/committee-webui", "name": "@govoplan/committee-webui",
"version": "0.1.21", "version": "0.1.22",
"private": true, "private": true,
"type": "module", "type": "module",
"main": "src/index.ts", "main": "src/index.ts",