Commit a607c990 authored by Robert Speicher's avatar Robert Speicher

Merge branch...

Merge branch '326734-previously-accepted-invites-should-redirect-to-the-gitlab-product' into 'master'

Invalid invite tokens should redirect to the GitLab product

See merge request gitlab-org/gitlab!60666
parents 07a8aaae 3f09ab76
......@@ -71,7 +71,7 @@ class InvitesController < ApplicationController
def ensure_member_exists
return if member
render_404
redirect_back_or_default(options: { alert: _("The invitation can not be found with the provided invite token.") })
end
def track_invite_join_click
......
---
title: Invalid invite tokens should redirect to the GitLab product
merge_request: 60666
author:
type: other
......@@ -31895,6 +31895,9 @@ msgstr ""
msgid "The interval must be one of %{intervals}."
msgstr ""
msgid "The invitation can not be found with the provided invite token."
msgstr ""
msgid "The invitation could not be accepted."
msgstr ""
......
......@@ -15,10 +15,11 @@ RSpec.describe InvitesController do
context 'when invite token is not valid' do
let(:raw_invite_token) { '_bogus_token_' }
it 'renders the 404 page' do
it 'redirects to root' do
request
expect(response).to have_gitlab_http_status(:not_found)
expect(response).to redirect_to(root_path)
expect(controller).to set_flash[:alert].to('The invitation can not be found with the provided invite token.')
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment