Commit 6f5cd03f authored by Douwe Maan's avatar Douwe Maan

Fix OAuth/SAML user blocking behavior

parent 56de781a
......@@ -29,9 +29,11 @@ module Gitlab
def save(provider = 'OAuth')
unauthorized_to_create unless gl_user
block_after_save = needs_blocking?
gl_user.save!
gl_user.block if needs_blocking?
gl_user.block if block_after_save
log.info "(#{provider}) saving user #{auth_hash.email} from login with extern_uid => #{auth_hash.uid}"
gl_user
......
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