Skip to content

Add dedicated permission for TTW blocks configuration - #139

Merged
sneridagh merged 1 commit into
mainfrom
blocks-config-permission
Sep 18, 2026
Merged

sneridagh merged 1 commit into
mainfrom
blocks-config-permission

Conversation

@sneridagh

Copy link
Copy Markdown
Member

What

Introduces a dedicated permission, kitconcept.can_edit_blocks_config ("Can edit TTW blocks configuration"), for the blocks_config_mutator field write permission, replacing kitconcept.intranet.siteadminsonly.

Changes

  • Behavior: blocks_settings.py now uses kitconcept.can_edit_blocks_config as the write permission for blocks_config_mutator.
  • Permission: registered in permissions.zcml.
  • Upgrade step v20260918001: update_blocks_config_permission grants the permission to Manager and Site Administrator on existing sites (source 20260917001 → destination 20260918001); registered in upgrades/configure.zcml and the base profile bumped in metadata.xml.
  • Fresh installs: same role mapping added to profiles/base/rolemap.xml (acquire="False").
  • Tests: added test_update_blocks_config_permission which runs the handler and asserts the permission maps to Manager and Site Administrator; updated the current_versions.base fixture and the upgrade-path parametrization.

Testing

uv run pytest tests/setup/test_upgrades.py — 16 passed, including the new handler test.

Change the `blocks_config_mutator` write permission from
`kitconcept.intranet.siteadminsonly` to the new dedicated
`kitconcept.can_edit_blocks_config` permission.

Register upgrade step v20260918001 that grants the permission to
Manager and Site Administrator on existing sites, and add the same
mapping to the base rolemap.xml for fresh installs.
@sneridagh
sneridagh merged commit f4601d7 into main Sep 18, 2026
12 checks passed
@sneridagh
sneridagh deleted the blocks-config-permission branch September 18, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant