From 846b35b5c9297117c8dd1caceb3050de8886b211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20S=C3=A9bille?= Date: Mon, 6 Jan 2025 10:42:43 +0100 Subject: [PATCH] perms: Allow readonly job applications to GPS --- itou/users/management/commands/sync_group_and_perms.py | 2 ++ tests/users/__snapshots__/test_sync_group_and_perms.ambr | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/itou/users/management/commands/sync_group_and_perms.py b/itou/users/management/commands/sync_group_and_perms.py index b631865a46..222fcd1c36 100644 --- a/itou/users/management/commands/sync_group_and_perms.py +++ b/itou/users/management/commands/sync_group_and_perms.py @@ -80,6 +80,8 @@ def get_permissions_dict(): group_gps_admin_permissions = { gps_models.FollowUpGroup: PERMS_ALL, gps_models.FollowUpGroupMembership: PERMS_ALL, + job_applications_models.JobApplication: PERMS_READ, + job_applications_models.JobApplicationTransitionLog: PERMS_READ, users_models.User: PERMS_ADD | PERMS_HIJACK, users_models.JobSeekerProfile: PERMS_EDIT, } diff --git a/tests/users/__snapshots__/test_sync_group_and_perms.ambr b/tests/users/__snapshots__/test_sync_group_and_perms.ambr index 4d37d9cf28..8ede734cef 100644 --- a/tests/users/__snapshots__/test_sync_group_and_perms.ambr +++ b/tests/users/__snapshots__/test_sync_group_and_perms.ambr @@ -3,6 +3,8 @@ list([ 'view_followupgroup', 'view_followupgroupmembership', + 'view_jobapplication', + 'view_jobapplicationtransitionlog', 'view_jobseekerprofile', 'view_user', ]) @@ -17,6 +19,8 @@ 'change_followupgroupmembership', 'delete_followupgroupmembership', 'view_followupgroupmembership', + 'view_jobapplication', + 'view_jobapplicationtransitionlog', 'change_jobseekerprofile', 'view_jobseekerprofile', 'add_user',