Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IA-3205 Backend for multi-projects #1557

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

IA-3205 Backend for multi-projects #1557

wants to merge 5 commits into from

Conversation

kemar
Copy link
Member

@kemar kemar commented Aug 19, 2024

Backend for multi-projects.

Related JIRA tickets : IA-3205

Changes

This PR is all about filtering.

Users can be associated with projects (user.iaso_profile.projects):

  • projects to which a user has access can be configured in the "User UI"
  • but we don't do anything with this yet (it's informative)

This PR uses this information to filter front-end lists.

When a user is linked to one or more projects:

  • only forms linked to these projects should be displayed
  • only forms linked to these projects should be available in filters

If the user has no projects, he will continue to see all the projects linked to his account.

How to test

These lists should be filtered on user's projects by default (if any):

The API endpoint used for filtering projects should also filter on the user's projects by default (if any):

@kemar kemar self-assigned this Aug 19, 2024
@kemar kemar marked this pull request as ready for review August 20, 2024 07:21
@beygorghor beygorghor requested a review from madewulf August 21, 2024 11:27
@beygorghor beygorghor requested a review from bramj September 6, 2024 08:05
@bramj bramj force-pushed the IA-3205-multi-project branch from 2172381 to fb5cb99 Compare September 30, 2024 13:21
Copy link
Contributor

@bramj bramj left a comment

Choose a reason for hiding this comment

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

This PR works as advertised, and kudos for the good test coverage 👍

But I have some thoughts:

  • If you're a user that also has access to the Projects module, the behaviour can be strange. You're allowed to create a new project, but you wont see it appear if you have a project assigned to yourself.
  • As for in the user management. When you assign a project to yourself, you suddenly cannot assign another one since you don't have access to it. Remove it from your account and you can add everything again.

See video:

iaso-multi-project.mov

Another thought: should we show this filtering to the user as we do with Org unit limitations? It could help to avoid confusion like "Why am I not seeing all my data?"

Screenshot 2024-09-30 at 15 58 29

@beygorghor
Copy link
Collaborator

Implemented here #1691

@beygorghor beygorghor closed this Oct 28, 2024
@kemar kemar reopened this Oct 28, 2024
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