Skip to content

Comments

[IA-4524] user management improve csv export permission role projects#2696

Open
Crebert08 wants to merge 11 commits intodevelopfrom
IA-4524-user-management-improve-csv-export-permission-role-projects
Open

[IA-4524] user management improve csv export permission role projects#2696
Crebert08 wants to merge 11 commits intodevelopfrom
IA-4524-user-management-improve-csv-export-permission-role-projects

Conversation

@Crebert08
Copy link
Contributor

@Crebert08 Crebert08 commented Jan 27, 2026

What problem is this PR solving?

This PR is about changing how the columns: permissions, roles and projects are displayed in the CSV and XLSX export. The former way consisted on making a columns in which all the permissions were displayed, same for roles and projects. The new way consists on showing all the permissions, roles and projects related to the account each one in its column and display 0 and 1 to show if the user has the permission/role/projects.

Related JIRA tickets

https://bluesquare.atlassian.net/browse/IA-4524

Changes

  • in iaso/api/profiles/profiles.py, I fetched all the permissions related to the account, created a logic to see which permission the user has to display 1 or 0 depending on the result, displayed the matrix of the permissions
  • in iaso/tests/api/test_profiles.py, I changed test_profile_list_export_as_csv and test_profile_list_export_as_csv to include the permissions matrix and then I added a new test to see if the export include the complete permission matrix while ignoring the permissions inherited from the user roles.

How to test

Because I only changed the view list_export, the only test needed is: sudo docker compose exec iaso python manage.py test iaso.tests.api.test_profiles

Print screen / video

image image image image image

Notes

Things that the reviewers should know:

  • known bugs that are out of the scope of the PR
  • other trade-offs that were made
  • does the PR depends on a PR in bluesquare-components?
  • should the PR be merged into another PR?

Doc

Tell us where the doc can be found (docs folder, wiki, in the code...).

@Crebert08 Crebert08 marked this pull request as draft January 27, 2026 14:59
@Crebert08 Crebert08 changed the title Ia 4524 user management improve csv export permission role projects [IA-4524] user management improve csv export permission role projects Jan 28, 2026
@Crebert08 Crebert08 marked this pull request as ready for review February 3, 2026 15:18
@Crebert08 Crebert08 requested a review from beygorghor February 4, 2026 14:36
@beygorghor beygorghor added the postrelease Should be merged just after the release label Feb 5, 2026
@beygorghor beygorghor requested review from tdethier and removed request for beygorghor and mestachs February 13, 2026 14:23
@quang-le quang-le added release Should be released in production at next deploy and removed postrelease Should be merged just after the release release Should be released in production at next deploy labels Feb 13, 2026
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