Skip to content

Conversation

@lanseg
Copy link

@lanseg lanseg commented Dec 1, 2025

Issue #379

Screenshot 2025-11-27 at 15-24-34 Extract – Détails de la demande 12 - Test request 2 _ MO - Cadastre complet

Purpose: per-request user ownership, make it possible for one operator to make a single request visible to another operator, even if the second operator is not an owner of the parent process.

Behavior:

  1. Admin user sees all requests, no matter what users or groups are configured for the request or process
  2. User can see or modify request if any of this applies:
    1. User or user's group is added to a Request
    2. User or user's group is added to a parent Process of this request
  3. A request-owning User can modify request-owning users and groups.
  4. After the user removes themselves from the request owners list, per-process ownership rules apply.

* Working version: visibility for groups and users

* Added filtering for completed requests

* Added translations for the card title

* Fixed session errors in test

* Added basic test for the per-request ownership

* Move ownership-related parts into an external class

* Added db migrations, similar to existing ones
@benoitregamey
Copy link
Contributor

Thank you for the contribution, will look it next week.

@lanseg
Copy link
Author

lanseg commented Jan 7, 2026

Hi! Any progress on the pull request review?

@benoitregamey
Copy link
Contributor

Hi! Any progress on the pull request review?

Not yet, I didn't have time. I'll keep you updated when it's done. Thanks for your patience

Copy link
Contributor

@benoitregamey benoitregamey left a comment

Choose a reason for hiding this comment

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

Hello!

I’ve tested your PR and everything works perfectly — great job!

From our side, we find this feature interesting and would like to merge it into the main project. However, in its current form, it changes the default behavior of the application, which could be problematic for users who rely on strict ACL configurations.

To be merged, the feature would need to be disabled by default and enabled via a toggle. This could be done either at the application level (through the main settings), or ideally at the process level (for example, with a toggle next to the assigned operators).

What do you think? Would it be possible to implement this change?

@lanseg
Copy link
Author

lanseg commented Jan 22, 2026

Hello!

I’ve tested your PR and everything works perfectly — great job!

From our side, we find this feature interesting and would like to merge it into the main project. However, in its current form, it changes the default behavior of the application, which could be problematic for users who rely on strict ACL configurations.

To be merged, the feature would need to be disabled by default and enabled via a toggle. This could be done either at the application level (through the main settings), or ideally at the process level (for example, with a toggle next to the assigned operators).

What do you think? Would it be possible to implement this change?

Yes, it's possible to hide the controls and the related code under the feature flags. But the schema-reated changes will stay (e.g. many-to-many tables will be in the database, but they will be empty)

@lanseg
Copy link
Author

lanseg commented Jan 22, 2026

Added a feature flag that blocks per-request ownership.
The ownership change was too invasive so it was too difficult to hide the whole change in all files behind this flag. Instead, this flag enables and disables per-request ownership editing, not the ownership extension itself.

  • Working use case (expected): feature is disabled by default, but user can enable it from the properties file.
  • Potential issue: an user enables feature and then changes their mind. In that case ownership/visibility rules will still apply. Could be done by clearing all the request <-> user/group tables if the flag is set to false.

@lanseg lanseg requested a review from benoitregamey January 22, 2026 15:38
Copy link
Contributor

@benoitregamey benoitregamey left a comment

Choose a reason for hiding this comment

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

Okay, that seems pretty good to me !

Since I'll meet the Extract Users Group next week on Monday, I'll discuss with them if it's okay to merge incoming PR if the default behaviour of the app is not changed.

I keep you updated !

Thanks for the contribution !

lanseg and others added 7 commits January 28, 2026 16:17
* Working version: visibility for groups and users

* Added filtering for completed requests

* Added translations for the card title

* Fixed session errors in test

* Added basic test for the per-request ownership

* Move ownership-related parts into an external class

* Added db migrations, similar to existing ones
@benoitregamey benoitregamey self-requested a review February 5, 2026 14:48
Copy link
Contributor

@benoitregamey benoitregamey left a comment

Choose a reason for hiding this comment

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

Please, rebase your branch onto the master and make all tests pass. FYI, there is now 3000+ tests implemented and integration tests are failing with your PR.

Thank you for your understanding and patience

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.

2 participants