Skip to content
Snippets Groups Projects
Unverified Commit a529d6d9 authored by Claire's avatar Claire Committed by GitHub
Browse files

Fix invites (#19560)

Fixes #19507

Fix regression from #19296
parent ac9fb0d6
No related branches found
No related tags found
No related merge requests found
......@@ -148,6 +148,7 @@ class Auth::RegistrationsController < Devise::RegistrationsController
return if @rules.empty? || (session[:accept_token].present? && params[:accept] == session[:accept_token])
@accept_token = session[:accept_token] = SecureRandom.hex
@invite_code = invite_code
set_locale { render :rules }
end
......
......@@ -14,7 +14,8 @@
.rules-list__text= rule.text
.stacked-actions
= link_to t('auth.rules.accept'), new_user_registration_path(accept: @accept_token), class: 'button'
- accept_path = @invite_code.present? ? public_invite_url(invite_code: @invite_code, accept: @accept_token) : new_user_registration_path(accept: @accept_token)
= link_to t('auth.rules.accept'), accept_path, class: 'button'
= link_to t('auth.rules.back'), root_path, class: 'button button-tertiary'
.form-footer= render 'auth/shared/links'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment