Merge pull request #19245 from overleaf/jpa-fix-invite

[web] use project invite token from request path

GitOrigin-RevId: d2670c3f10f8c9a15420fab7506f9ebdf4108c6c
This commit is contained in:
Jakob Ackermann 2024-07-03 12:17:28 +02:00 committed by Copybot
parent f9245b8c08
commit 9406b2bd31
2 changed files with 3 additions and 2 deletions

View file

@ -328,6 +328,7 @@ const CollaboratorsInviteController = {
// finally render the invite // finally render the invite
res.render('project/invite/show', { res.render('project/invite/show', {
invite, invite,
token,
project, project,
owner, owner,
title: 'Project Invite', title: 'Project Invite',

View file

@ -20,10 +20,10 @@ block content
form.form( form.form(
data-ol-regular-form data-ol-regular-form
method="POST", method="POST",
action="/project/"+invite.projectId+"/invite/token/"+invite.token+"/accept" action="/project/"+invite.projectId+"/invite/token/"+token+"/accept"
) )
input(name='_csrf', type='hidden', value=csrfToken) input(name='_csrf', type='hidden', value=csrfToken)
input(name='token', type='hidden', value=invite.token) input(name='token', type='hidden', value=token)
.form-group.text-center .form-group.text-center
button.btn.btn-lg.btn-primary( button.btn.btn-lg.btn-primary(
type="submit" type="submit"