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

Création de compte candidat : déconnecter la modification de compte du parcours apply #5177

Merged
merged 5 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion itou/templates/apply/submit/application/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1 class="flex-grow-1">{% include 'apply/includes/_submit_title.html' %}</h1>
<p>
Dernière actualisation du profil : {{ job_seeker.last_checked_at|date }} à {{ job_seeker.last_checked_at|time }}
{% if can_view_personal_information and not request.user.is_job_seeker %}
<a class="btn btn-link" href="{% url "job_seekers_views:update_job_seeker_step_1" company_pk=siae.pk job_seeker_public_id=job_seeker.public_id %}">Vérifier le profil</a>
<a class="btn btn-link" href="{% url "job_seekers_views:update_job_seeker_start" %}{% querystring job_seeker=job_seeker.public_id company=siae.pk from_url=request.get_full_path|urlencode %}">Vérifier le profil</a>
{% endif %}
{% if new_check_needed %}<i class="ri-information-line ri-xl text-warning"></i>{% endif %}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ <h1>
<div class="c-box my-4">
<h2>
Informations personnelles
<a class="btn btn-outline-primary float-end" href="{% url "job_seekers_views:update_job_seeker_step_1_for_hire" company_pk=siae.pk job_seeker_public_id=job_seeker.public_id %}">Mettre à jour</a>
<a class="btn btn-outline-primary float-end"
href="{% url "job_seekers_views:update_job_seeker_start" %}{% querystring job_seeker=job_seeker.public_id company=siae.pk from_url=request.get_full_path|urlencode %}">Mettre à jour</a>
</h2>

{% include "apply/includes/profile_infos.html" %}
Expand Down
2 changes: 1 addition & 1 deletion itou/www/apply/views/submit_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def setup(self, request, *args, **kwargs):
self.sender = request.user

def dispatch(self, request, *args, **kwargs):
if self.sender.is_authenticated and self.sender.kind not in [UserKind.PRESCRIBER, UserKind.EMPLOYER]:
if self.sender.kind not in [UserKind.PRESCRIBER, UserKind.EMPLOYER]:
logger.info(f"dispatch ({request.path}) : {self.sender.kind} in sender tunnel")
return HttpResponseRedirect(reverse("apply:start", kwargs={"company_pk": self.company.pk}))
return super().dispatch(request, *args, **kwargs)
Expand Down
43 changes: 35 additions & 8 deletions itou/www/job_seekers_views/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,28 @@
name="create_job_seeker_step_end_for_hire",
kwargs={"hire_process": True},
),
# TODO(ewen): deprecated URLs
path(
"<int:company_pk>/hire/update/<uuid:job_seeker_public_id>/1",
views.UpdateJobSeekerStep1View.as_view(),
views.DeprecatedUpdateJobSeekerStep1View.as_view(),
name="update_job_seeker_step_1_for_hire",
kwargs={"hire_process": True},
),
path(
"<int:company_pk>/hire/update/<uuid:job_seeker_public_id>/2",
views.UpdateJobSeekerStep2View.as_view(),
views.DeprecatedUpdateJobSeekerStep2View.as_view(),
name="update_job_seeker_step_2_for_hire",
kwargs={"hire_process": True},
),
path(
"<int:company_pk>/hire/update/<uuid:job_seeker_public_id>/3",
views.UpdateJobSeekerStep3View.as_view(),
views.DeprecatedUpdateJobSeekerStep3View.as_view(),
name="update_job_seeker_step_3_for_hire",
kwargs={"hire_process": True},
),
path(
"<int:company_pk>/hire/update/<uuid:job_seeker_public_id>/end",
views.UpdateJobSeekerStepEndView.as_view(),
views.DeprecatedUpdateJobSeekerStepEndView.as_view(),
name="update_job_seeker_step_end_for_hire",
kwargs={"hire_process": True},
),
Expand All @@ -110,25 +111,51 @@
),
# Job seeker check/updates
path(
"<int:company_pk>/update/<uuid:job_seeker_public_id>/1",
"update/start",
views.UpdateJobSeekerStartView.as_view(),
name="update_job_seeker_start",
),
path(
"update/<uuid:session_uuid>/1",
views.UpdateJobSeekerStep1View.as_view(),
name="update_job_seeker_step_1",
),
path(
"<int:company_pk>/update/<uuid:job_seeker_public_id>/2",
"update/<uuid:session_uuid>/2",
views.UpdateJobSeekerStep2View.as_view(),
name="update_job_seeker_step_2",
),
path(
"<int:company_pk>/update/<uuid:job_seeker_public_id>/3",
"update/<uuid:session_uuid>/3",
views.UpdateJobSeekerStep3View.as_view(),
name="update_job_seeker_step_3",
),
path(
"<int:company_pk>/update/<uuid:job_seeker_public_id>/end",
"update/<uuid:session_uuid>/end",
views.UpdateJobSeekerStepEndView.as_view(),
name="update_job_seeker_step_end",
),
# TODO(ewen): deprecated URLs
path(
"<int:company_pk>/update/<uuid:job_seeker_public_id>/1",
views.DeprecatedUpdateJobSeekerStep1View.as_view(),
name="update_job_seeker_step_1",
),
path(
"<int:company_pk>/update/<uuid:job_seeker_public_id>/2",
views.DeprecatedUpdateJobSeekerStep2View.as_view(),
name="update_job_seeker_step_2",
),
path(
"<int:company_pk>/update/<uuid:job_seeker_public_id>/3",
views.DeprecatedUpdateJobSeekerStep3View.as_view(),
name="update_job_seeker_step_3",
),
path(
"<int:company_pk>/update/<uuid:job_seeker_public_id>/end",
views.DeprecatedUpdateJobSeekerStepEndView.as_view(),
name="update_job_seeker_step_end",
),
# Common
path(
"<int:company_pk>/create/<uuid:job_seeker_public_id>/check-infos",
Expand Down
Loading
Loading