Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
mastodon
Commits
a529d6d9
Unverified
Commit
a529d6d9
authored
2 years ago
by
Claire
Committed by
GitHub
2 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix invites (#19560)
Fixes #19507 Fix regression from #19296
parent
ac9fb0d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/auth/registrations_controller.rb
+1
-0
app/controllers/auth/registrations_controller.rb
app/views/auth/registrations/rules.html.haml
+2
-1
app/views/auth/registrations/rules.html.haml
with
3 additions
and
1 deletion
+3
-1
app/controllers/auth/registrations_controller.rb
+
1
-
0
View file @
a529d6d9
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
app/views/auth/registrations/rules.html.haml
+
2
-
1
View file @
a529d6d9
...
...
@@ -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'
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets