All checks were successful
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 1m39s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 12s
Schema 013; Projekte/Arbeitspakete/Aufgaben pflegbar; Tab Zielzustände vs Ausführung. Co-authored-by: Cursor <cursoragent@cursor.com>
192 lines
4.5 KiB
Python
192 lines
4.5 KiB
Python
"""Operating model capabilities (AP0.8)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from rights_registry import CapabilityRegistration, register_capability
|
|
|
|
_MEMBER_READ = (
|
|
("portal", "admin"),
|
|
("portal", "user"),
|
|
("tenant", "owner"),
|
|
("tenant", "admin"),
|
|
("tenant", "member"),
|
|
)
|
|
|
|
_MEMBER_MANAGE = (
|
|
("portal", "admin"),
|
|
("tenant", "owner"),
|
|
("tenant", "admin"),
|
|
("tenant", "member"),
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.attention.read",
|
|
module="attention",
|
|
description="Attention- und NextAction-Sichten lesen",
|
|
default_grants=_MEMBER_READ,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.blocker.read",
|
|
module="blocker",
|
|
description="Blocker im aktiven Tenant lesen",
|
|
default_grants=_MEMBER_READ,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.blocker.manage",
|
|
module="blocker",
|
|
description="Blocker anlegen und bearbeiten",
|
|
default_grants=_MEMBER_MANAGE,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.backlog.read",
|
|
module="backlog",
|
|
description="Backlog-Items im aktiven Tenant lesen",
|
|
default_grants=_MEMBER_READ,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.backlog.manage",
|
|
module="backlog",
|
|
description="Backlog-Items anlegen, bearbeiten und konvertieren",
|
|
default_grants=_MEMBER_MANAGE,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.milestone.read",
|
|
module="milestone",
|
|
description="Meilensteine im aktiven Tenant lesen",
|
|
default_grants=_MEMBER_READ,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.milestone.manage",
|
|
module="milestone",
|
|
description="Meilensteine anlegen und bearbeiten",
|
|
default_grants=_MEMBER_MANAGE,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.evidence.read",
|
|
module="evidence",
|
|
description="Evidence im aktiven Tenant lesen",
|
|
default_grants=_MEMBER_READ,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.evidence.manage",
|
|
module="evidence",
|
|
description="Evidence anlegen und bearbeiten",
|
|
default_grants=_MEMBER_MANAGE,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.decision.read",
|
|
module="decision",
|
|
description="Entscheidungen im aktiven Tenant lesen",
|
|
default_grants=_MEMBER_READ,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.decision.manage",
|
|
module="decision",
|
|
description="Entscheidungen anlegen und bearbeiten",
|
|
default_grants=_MEMBER_MANAGE,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.review.read",
|
|
module="review",
|
|
description="Reviews im aktiven Tenant lesen",
|
|
default_grants=_MEMBER_READ,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.review.manage",
|
|
module="review",
|
|
description="Reviews anlegen und bearbeiten",
|
|
default_grants=_MEMBER_MANAGE,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.recurring.read",
|
|
module="recurring",
|
|
description="Recurring-Elemente im aktiven Tenant lesen",
|
|
default_grants=_MEMBER_READ,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.recurring.manage",
|
|
module="recurring",
|
|
description="Recurring-Elemente anlegen und bearbeiten",
|
|
default_grants=_MEMBER_MANAGE,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.roadmap.reopen",
|
|
module="roadmap",
|
|
description="Erreichte Plan-Elemente wieder öffnen (Reopen)",
|
|
default_grants=_MEMBER_MANAGE,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.roadmap.reopen.emergency",
|
|
module="roadmap",
|
|
description="Plan-Reopen als Portal-Admin (Notfall)",
|
|
default_grants=(("portal", "admin"),),
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.project.read",
|
|
module="project",
|
|
description="Projekte im aktiven Tenant lesen",
|
|
default_grants=_MEMBER_READ,
|
|
)
|
|
)
|
|
|
|
register_capability(
|
|
CapabilityRegistration(
|
|
key="kairo.project.manage",
|
|
module="project",
|
|
description="Projekte anlegen und bearbeiten",
|
|
default_grants=_MEMBER_MANAGE,
|
|
)
|
|
)
|