[Feature] Move delegation ceilings and "more restrictive only" validation into policy #4

Closed
opened 2026-07-10 22:02:15 +02:00 by zemion · 2 comments
Owner

Moved from add-ideas/govoplan-core#89.

Reason: Policy hierarchy and restriction validation belong to the policy module.

Original issue body:

Imported from a backlog-like text file.

  • Source: /mnt/DATA/Nextcloud/ADD ideas UG/Products/govoplan/split-concept-action-plan.md
  • Line: 209
  • Source kind: product
  • Section: GovOPlaN Split Concept and Action Plan > Staged Refactor Plan > Phase 4: Extract Policy

Imported item:

Move delegation ceilings and "more restrictive only" validation into policy.
Moved from add-ideas/govoplan-core#89. Reason: Policy hierarchy and restriction validation belong to the policy module. Original issue body: <!-- codex-generic-backlog-fingerprint:62fea7ed55fd735966acc79c --> Imported from a backlog-like text file. - Source: `/mnt/DATA/Nextcloud/ADD ideas UG/Products/govoplan/split-concept-action-plan.md` - Line: `209` - Source kind: `product` - Section: `GovOPlaN Split Concept and Action Plan > Staged Refactor Plan > Phase 4: Extract Policy` Imported item: ```text Move delegation ceilings and "more restrictive only" validation into policy. ```
Author
Owner

Merged related core issue add-ideas/govoplan-core#16: add-ideas/govoplan-core#16.

The older item asks to define may-use/must-use/may-override/may-not-override/may-merge/may-delegate constraints; this belongs with policy delegation ceilings and restrictiveness validation.

Merged related core issue `add-ideas/govoplan-core#16`: https://git.add-ideas.de/add-ideas/govoplan-core/issues/16. The older item asks to define may-use/must-use/may-override/may-not-override/may-merge/may-delegate constraints; this belongs with policy delegation ceilings and restrictiveness validation.
Author
Owner

Codex State: done

Summary

  • Moved reusable delegation-ceiling and more-restrictive-only checks into the policy module helper.
  • Retention keeps its existing validation messages while using shared PolicyRestrictionRule checks.

Changed Files

  • src/govoplan_policy/backend/hierarchy.py
  • src/govoplan_policy/backend/retention.py
  • tests/test_policy_hierarchy.py

Verification

  • PYTHONPATH=src:/mnt/DATA/git/govoplan-core/src python -m unittest discover -s tests
## Codex State: done ### Summary - Moved reusable delegation-ceiling and more-restrictive-only checks into the policy module helper. - Retention keeps its existing validation messages while using shared PolicyRestrictionRule checks. ### Changed Files - `src/govoplan_policy/backend/hierarchy.py` - `src/govoplan_policy/backend/retention.py` - `tests/test_policy_hierarchy.py` ### Verification - `PYTHONPATH=src:/mnt/DATA/git/govoplan-core/src python -m unittest discover -s tests`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: add-ideas/govoplan-policy#4
No description provided.