提交 6f5cd03f 编写于 作者: D Douwe Maan

Fix OAuth/SAML user blocking behavior

上级 56de781a
...@@ -29,9 +29,11 @@ module Gitlab ...@@ -29,9 +29,11 @@ module Gitlab
def save(provider = 'OAuth') def save(provider = 'OAuth')
unauthorized_to_create unless gl_user unauthorized_to_create unless gl_user
block_after_save = needs_blocking?
gl_user.save! 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}" log.info "(#{provider}) saving user #{auth_hash.email} from login with extern_uid => #{auth_hash.uid}"
gl_user gl_user
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册