Commit dfced477 authored by Adam Hegyi's avatar Adam Hegyi

Send verify email for users created via SCIM API

parent d9a4ef1c
---
title: Fix bypass email verification when SCIM user is created via API
merge_request:
author:
type: security
...@@ -8,7 +8,7 @@ module EE ...@@ -8,7 +8,7 @@ module EE
IDENTITY_PROVIDER = 'group_saml' IDENTITY_PROVIDER = 'group_saml'
PASSWORD_AUTOMATICALLY_SET = true PASSWORD_AUTOMATICALLY_SET = true
SKIP_EMAIL_CONFIRMATION = true SKIP_EMAIL_CONFIRMATION = false
DEFAULT_ACCESS = :guest DEFAULT_ACCESS = :guest
def initialize(group, parsed_hash) def initialize(group, parsed_hash)
......
...@@ -44,6 +44,15 @@ describe ::EE::Gitlab::Scim::ProvisioningService do ...@@ -44,6 +44,15 @@ describe ::EE::Gitlab::Scim::ProvisioningService do
expect(User.find_by(service_params.except(:extern_uid))).to be_a(User) expect(User.find_by(service_params.except(:extern_uid))).to be_a(User)
end end
it 'user record requires confirmation' do
service.execute
user = User.find_by(email: service_params[:email])
expect(user).to be_present
expect(user).not_to be_confirmed
end
context 'existing user' do context 'existing user' do
before do before do
create(:user, email: 'work@example.com') create(:user, email: 'work@example.com')
......
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