diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-22 17:07:29 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 09:33:20 -0600 |
commit | 6f5cd03fcb63b379d218cf0b475f85f675dd9fb6 (patch) | |
tree | e42bc9cbe9b7bfa3fc3545bddd32de9eec584ac6 /lib | |
parent | 56de781a2cef437b6e1af748dc0c231af74e044d (diff) | |
download | gitlab-ce-6f5cd03fcb63b379d218cf0b475f85f675dd9fb6.tar.gz |
Fix OAuth/SAML user blocking behavior
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/o_auth/user.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/o_auth/user.rb b/lib/gitlab/o_auth/user.rb index 87af76cc122..95d2f559588 100644 --- a/lib/gitlab/o_auth/user.rb +++ b/lib/gitlab/o_auth/user.rb @@ -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 |