Commit b641e0c3 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'jej/unflag-group-saml-sign-in-to-dot-com' into 'master'

Remove feature flag for SAML sign in to GitLab.com

Closes #9654

See merge request gitlab-org/gitlab-ee!12660
parents dae85d21 776adc89
......@@ -82,24 +82,6 @@ class Groups::OmniauthCallbacksController < OmniauthCallbacksController
Gitlab::Auth::GroupSaml::User.new(oauth, @saml_provider)
end
override :sign_in_user_flow
def sign_in_user_flow(auth_user_class)
# User has successfully authenticated with the SAML provider for the group
# but is not signed in to the GitLab instance.
if sign_in_to_gitlab_enabled?
super
else
flash[:notice] = "You must be signed in to use SAML with this group"
redirect_to new_user_session_path
end
end
def sign_in_to_gitlab_enabled?
::Feature.enabled?(:group_saml_allows_sign_in_to_gitlab, @unauthenticated_group)
end
override :fail_login
def fail_login(user)
if user
......
---
title: Group SAML can be used to sign into a GitLab instance
merge_request: 12660
author:
type: added
......@@ -188,20 +188,6 @@ describe Groups::OmniauthCallbacksController do
end
end
context 'identity linked but sign in flow disabled' do
before do
create_linked_user
stub_feature_flags(group_saml_allows_sign_in_to_gitlab: false)
end
it 'prevents sign in' do
post provider, params: { group_id: group }
expect(flash[:notice]).to start_with('You must be signed in')
expect(response).to redirect_to('/users/sign_in')
end
end
it_behaves_like "and identity already linked"
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