Skip to content

Conversation

@remdub
Copy link
Member

@remdub remdub commented Nov 3, 2025

This pull request introduces major improvements to user management by delegating user creation and updates to Keycloak, updating the development environment to Plone 6.1.3, and overriding several user-related views to handle redirection to external URLs. It also adds new configuration options, updates tests, and brings in a new dependency. Below are the most important changes grouped by theme:

User Management Overhaul:

  • Overrode Plone views related to user management (new-user, personal-information, change-password) to redirect to URLs managed by Keycloak instead of handling user creation or updates within Plone. These URLs are now configurable properties. ([[1]](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-09368b6b8dade97b1569aafa05356efca24776616a868424af33c9bc1247bfc8R78-R109), [[2]](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-ffd1eb1a5c4397bb56a9abf6353f065b1027ec8ee9609277e0aee7f21d713f7dR141-R162), [[3]](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-35c26b1332ec504be598343d4107e0cff5d118bbce8ebc3a4c1c88eeaa65e885R148-R168), [[4]](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-0ebec1980c0c174e2fc2ce0a43d0731891a328ad4023907ac9ca4403c802a2d5R41-R70), [[5]](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-edd2433705a103334d1dacac7f8764a8f02541ee3fa1fa602566933a098750f4R58-R67))
  • Added a new user group overview template (usergroups_usersoverview.pt) and view registration to customize user listing and management UI. ([[1]](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-09368b6b8dade97b1569aafa05356efca24776616a868424af33c9bc1247bfc8R78-R109), [[2]](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-d0f77125d6b76d7a512f69cd96a899457b4a1b017ca7dea72ef7a6180f1dc36fR1-R289))

Configuration and Environment:

  • Upgraded the development environment to Plone 6.1.3, updating constraints.txt and documenting the change in CHANGES.md. ([[1]](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-d975bf659606195d2165918f93e1cf680ef68ea3c9cab994f033705fea8238b2L1-R9), [[2]](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-0e0b1dc0663c5b9d12d29c4a978138dd9103815fe48eb5186e147e06c14f0e49L1-R1))
  • Added a new dependency entry for pas.plugins.oidc in mx.ini. ([mx.iniR18-R21](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-c626e52ad08906179fea0d1cc5e5f7f597ac842f8e49bc7c9282f59b295503d3R18-R21))

Testing:

  • Added new tests to verify redirection behavior for the overridden user management views and to check the customized user group overview. ([[1]](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-f8d2cc77d5ac966c313d95149c9ea27e240e112e5b5a1ec5fa2b747c608bd8c4R1-R27), [[2]](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-f3d5d82ff9b77f20fa4435a9a345358c2bf2e790e542ef5500c79f1160b79b66R1-R27), [[3]](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-c1778309a77128218d3dd78e61b7479591a177c0748a4474c9215050e53b9bbaR1-R29), [[4]](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-805f2600335bde7b8580cc369082371112747863248ea7de715b51f6aad28c71R1-R49))
  • Updated test fixtures to include the new configurable URLs for user management. ([tests/conftest.pyR62-R64](https://github.com/IMIO/pas.plugins.kimug/pull/13/files#diff-e52e4ddd58b7ef887ab03c04116e676f6280b824ab7469d5d3080e5cba4f2128R62-R64))

These changes ensure that all user management flows are now handled externally via Keycloak, improving security and centralizing user data management.

@remdub remdub requested a review from Copilot November 3, 2025 12:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds user management view overrides to redirect user operations to external Keycloak URLs instead of handling them within Plone. The changes introduce three new configurable redirect views for adding users, managing personal information, and changing passwords.

Key changes:

  • Added three new browser views (NewUserView, PersonalInformationView, ChangePasswordView) that redirect to external URLs
  • Extended the OIDC plugin configuration to include configurable URLs for user management operations
  • Overrode the default usergroup-userprefs view with a custom template
  • Updated development environment to Plone 6.1.3

Reviewed Changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/pas/plugins/kimug/browser/view.py Added three new redirect view classes for user management
src/pas/plugins/kimug/browser/configure.zcml Registered the new browser views with appropriate permissions
src/pas/plugins/kimug/plugin/init.py Extended plugin properties to include user management URLs
src/pas/plugins/kimug/interfaces.py Added schema fields for the three user management URLs
src/pas/plugins/kimug/utils.py Added configuration logic to set user management URLs from environment
src/pas/plugins/kimug/browser/usergroups_usersoverview.pt Custom template override for user groups overview
tests/view/test_*.py Test files for the new redirect views
tests/conftest.py Added test configuration for user management URLs
constraints.txt Updated Plone version constraint to 6.1.3
mx.ini Added pas.plugins.oidc dependency configuration
CHANGES.md Updated changelog with new features

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@remdub remdub requested a review from bsuttor November 3, 2025 12:46
Copy link
Member

@bsuttor bsuttor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@bsuttor bsuttor merged commit c0716b9 into main Nov 3, 2025
7 checks passed
@bsuttor bsuttor deleted the override-new-user branch November 3, 2025 13:04
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.

3 participants