Skip to content

Commit fba4395

Browse files
committed
Only consider valid invite links in registration controller
1 parent afda0f4 commit fba4395

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/controllers/auth/registrations_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ def set_body_classes
9191
end
9292

9393
def set_invite
94-
@invite = invite_code.present? ? Invite.find_by(code: invite_code) : nil
94+
invite = invite_code.present? ? Invite.find_by(code: invite_code) : nil
95+
@invite = invite&.valid_for_use? ? invite : nil
9596
end
9697

9798
def determine_layout

0 commit comments

Comments
 (0)