refactor(reporting): reuse exact principal projection contract
Module Package Release / publish-packages (push) Successful in 15s

Release v0.1.22. Coordinated integrity review: GovOPlaN/govoplan-core#298.
This commit is contained in:
2026-09-08 12:19:40 +02:00
parent 89755e1924
commit 8253bd0dd6
7 changed files with 8 additions and 23 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@govoplan/reporting-webui",
"version": "0.1.21",
"version": "0.1.22",
"private": true,
"type": "module",
"main": "webui/src/index.ts",
+2 -2
View File
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
[project]
name = "govoplan-reporting"
version = "0.1.21"
version = "0.1.22"
description = "GovOPlaN governed reporting and semantic BI module."
readme = "README.md"
requires-python = ">=3.12"
license = { text = "AGPL-3.0-or-later" }
authors = [{ name = "GovOPlaN" }]
dependencies = [
"govoplan-core>=0.1.45",
"govoplan-core>=0.1.46",
"govoplan-access>=0.1.18",
]
+1 -1
View File
@@ -1,3 +1,3 @@
"""GovOPlaN Reporting module."""
__version__ = "0.1.21"
__version__ = "0.1.22"
+1 -16
View File
@@ -10,6 +10,7 @@ import uuid
from sqlalchemy import and_, exists, func, or_
from sqlalchemy.orm import Query, Session
from govoplan_core.core.principal_helpers import principal_actor_ids as _actor_ids
from govoplan_core.core.events import (
EventActorRef,
EventObjectRef,
@@ -884,22 +885,6 @@ def _actor(principal: object) -> str | None:
return None
def _actor_ids(principal: object) -> tuple[str, ...]:
user = getattr(principal, "user", None)
return tuple(
dict.fromkeys(
str(value)
for value in (
getattr(principal, "account_id", None),
getattr(principal, "identity_id", None),
getattr(principal, "membership_id", None),
getattr(user, "id", None),
)
if str(value or "").strip()
)
)
def _principal_tenant(principal: object) -> str:
tenant_id = str(getattr(principal, "tenant_id", "") or "").strip()
if not tenant_id:
+1 -1
View File
@@ -83,7 +83,7 @@ from govoplan_reporting.backend.search_source import create_reporting_search_sou
MODULE_ID = "reporting"
MODULE_NAME = "Reporting"
MODULE_VERSION = "0.1.21"
MODULE_VERSION = "0.1.22"
def _permission(scope: str, label: str, description: str) -> PermissionDefinition:
+1 -1
View File
@@ -92,7 +92,7 @@ class _Provider:
del session
return ReportProviderResult(
report_id=request.report_id,
generated_at=datetime(2026, 8, 2, 10, 0, tzinfo=UTC),
generated_at=datetime.now(UTC),
payload={"metric": 12},
source_revisions=(
{
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@govoplan/reporting-webui",
"version": "0.1.21",
"version": "0.1.22",
"private": true,
"type": "module",
"main": "src/index.ts",