Skip to content

GPS: Permettre de donner la visibilité sur les informations candidat au cas par cas#5794

Merged
tonial merged 7 commits intomasterfrom
alaurent/gps_permissions
Apr 1, 2025
Merged

GPS: Permettre de donner la visibilité sur les informations candidat au cas par cas#5794
tonial merged 7 commits intomasterfrom
alaurent/gps_permissions

Conversation

@tonial
Copy link
Copy Markdown
Contributor

@tonial tonial commented Mar 18, 2025

🤔 Pourquoi ?

https://www.notion.so/gip-inclusion/Donner-aux-orienteurs-la-visibilit-sur-les-fiches-b-n-ficiaires-au-cas-par-cas-1b95f321b604804e9424f5a8763de03e?pvs=4

🍰 Comment ?

Décrivez en quelques mots la solution retenue et mise en oeuvre, les difficultés ou problèmes rencontrés. Attirez l'attention sur les décisions d'architecture ou de conception importantes.

🚨 À vérifier

  • Mettre à jour le CHANGELOG_breaking_changes.md ?
  • Ajouter l'étiquette « Bug » ?

🏝️ Comment tester ?

Les instructions pour reproduire le problème, les profils de test, le parcours spécifique à utiliser, etc. Si vous disposez d'une recette jetable, mettre l'URL pour tester dans cette partie.

💻 Captures d'écran

@tonial tonial added the modifié Modifié dans le changelog. label Mar 18, 2025
@tonial tonial self-assigned this Mar 18, 2025
@tonial tonial force-pushed the alaurent/gps_permissions branch from 8a7b667 to 024418b Compare March 18, 2025 09:57
Copy link
Copy Markdown
Member

@francoisfreitag francoisfreitag left a comment

Choose a reason for hiding this comment

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

L’idée est qu’on donnerait manuellement accès à des orienteurs via l’admin ?
A-t-on prévu un process pour réévaluer les droits donnés ?

Le code me semble tout à fait adapté à la finalité, mais je suis surpris que le candidat n’ait pas de visibilité sur ces accès et ne puisse pas s’y opposer.

Comment thread itou/www/gps/views.py Outdated
Comment thread tests/gps/test_views.py Outdated
@tonial
Copy link
Copy Markdown
Contributor Author

tonial commented Mar 18, 2025

Il y a une carte au backlog pour donner accès à GPS au candidat pour qu'il puisse typiquement accepter lui même ces demandes d'accès à ses données.
LJ voudrait pouvoir le gérer de manière plus simple au cas par cas en attendant d'avoir cadrer la suite.

@tonial tonial force-pushed the alaurent/gps_permissions branch from 024418b to 57b35ae Compare March 18, 2025 20:43
@tonial tonial requested a review from francoisfreitag March 19, 2025 06:09
@tonial
Copy link
Copy Markdown
Contributor Author

tonial commented Mar 19, 2025

Bon, la carte n'était visiblement pas terminée quand je l'ai attaqué..
Il manque un bouton pour demander la visibilité avec 3 modales différentes en fonction du cas...

Je passe la PR en draft en attendant.

@tonial tonial marked this pull request as draft March 19, 2025 06:09
@tonial tonial force-pushed the alaurent/gps_permissions branch 2 times, most recently from 19beb04 to 2517d0f Compare March 24, 2025 09:58
@tonial tonial added the 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC label Mar 24, 2025
@tonial tonial force-pushed the alaurent/gps_permissions branch from 2517d0f to dd2b1dc Compare March 24, 2025 13:10
@github-actions
Copy link
Copy Markdown

🥁 La recette jetable est prête ! 👉 Je veux tester cette PR !

@tonial tonial force-pushed the alaurent/gps_permissions branch 2 times, most recently from 6461e27 to 86702d4 Compare March 24, 2025 19:58
@tonial tonial marked this pull request as ready for review March 24, 2025 20:05
@tonial
Copy link
Copy Markdown
Contributor Author

tonial commented Mar 24, 2025

C'est bon, le bouton et la modale pour demander l'accès sont implémentés, de même que la notification slack.

@tonial tonial force-pushed the alaurent/gps_permissions branch 2 times, most recently from 87f3b02 to 76f158e Compare March 25, 2025 13:30
@francoisfreitag francoisfreitag dismissed their stale review March 25, 2025 16:21

Code overhaul

@tonial tonial force-pushed the alaurent/gps_permissions branch 2 times, most recently from 86a0127 to 492f757 Compare March 27, 2025 08:34
@tonial tonial requested a review from EwenKorr March 31, 2025 09:35
@tonial tonial force-pushed the alaurent/gps_permissions branch from 492f757 to 7d2f63b Compare March 31, 2025 11:22
Comment thread itou/www/gps/urls.py
Comment thread itou/utils/slack.py Outdated
Comment thread itou/www/gps/views.py
send_slack_message_for_gps(
f":mag: *Demande d’accès à la fiche*\n"
f"<{user_admin_url}|{request.user.get_full_name()}> veut avoir accès aux informations de "
f"<{beneficiary_admin_url}|{mask_unless(follow_up_group.beneficiary.get_full_name(), False)}> "
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Je serais curieux de savoir les vérifications effectuées par les administrateurs pour donner ou non l'accès 👀

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

On peut tagger le principal intéressé pour lui demander :) @louije

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Deux options :

  • le lien paraît légitime / évident (orga qui a pignon sur rue, localité qui matche, des actions ont été faites, etc.)
  • on a le moindre doute -> envoi d'un mail à un prescripteur / employeur qui a l'air actif

Comment thread itou/templates/gps/group_details_base.html
Comment thread itou/www/gps/views.py Outdated
Copy link
Copy Markdown
Contributor

@EwenKorr EwenKorr left a comment

Choose a reason for hiding this comment

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

Rien de plus à ajouter que Xavier. J'avais seulement relevé le point qu'il a évoqué au sujet de l'autocomplete (https://github.com/gip-inclusion/les-emplois/pull/5794/files#r2020982684)

@tonial tonial force-pushed the alaurent/gps_permissions branch 3 times, most recently from 55f3f07 to b5851c2 Compare March 31, 2025 13:44
Comment thread itou/utils/templatetags/nav.py
Comment thread tests/gps/test_views.py
Comment thread tests/gps/test_views.py
@tonial tonial force-pushed the alaurent/gps_permissions branch from b5851c2 to a097c5e Compare March 31, 2025 14:10
Comment thread itou/gps/models.py

updated_at = models.DateTimeField(verbose_name="date de modification", auto_now=True)
can_view_personal_information = models.BooleanField(
verbose_name="accès aux données du bénéficiaire", default=False
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Peut-être rajouter un commentaire "(pour les utilisateurs n'ayant par défaut pas les droits d'accès)" ?
Pour que quelqu'un ne se dise pas: "je ne comprends pas, can_view_personal_information=False et il a tout de même accès" ?

Comment thread itou/www/gps/urls.py Outdated
views.display_contact_info,
name="display_contact_info",
),
path("groups/<int:group_id>/ask_access", views.ask_access, name="ask_access"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
path("groups/<int:group_id>/ask_access", views.ask_access, name="ask_access"),
path("groups/<int:group_id>/ask-access", views.ask_access, name="ask_access"),

@tonial tonial force-pushed the alaurent/gps_permissions branch from a097c5e to 07962e2 Compare April 1, 2025 07:53
@tonial tonial enabled auto-merge April 1, 2025 07:53
For prescriber without can_view_personal_information permissions
@tonial tonial force-pushed the alaurent/gps_permissions branch from 07962e2 to a089ab2 Compare April 1, 2025 08:35
@tonial tonial added this pull request to the merge queue Apr 1, 2025
Merged via the queue into master with commit e327fec Apr 1, 2025
11 checks passed
@tonial tonial deleted the alaurent/gps_permissions branch April 1, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC modifié Modifié dans le changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants