summaryrefslogtreecommitdiff
path: root/lib/gitlab/auth/ldap
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2018-04-23 16:20:33 +0100
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2018-04-23 16:24:56 +0100
commitdd09a19ad6f9daf36cd26c749be2b90d4f968b92 (patch)
treebfe01dbcd2548ad90d12ae5511dcbe4344711c97 /lib/gitlab/auth/ldap
parent795cd7f95206db318c58939698f63eee5abedb34 (diff)
downloadgitlab-ce-dd09a19ad6f9daf36cd26c749be2b90d4f968b92.tar.gz
Auth::User classes refactor adds should_save?
Diffstat (limited to 'lib/gitlab/auth/ldap')
-rw-r--r--lib/gitlab/auth/ldap/user.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/gitlab/auth/ldap/user.rb b/lib/gitlab/auth/ldap/user.rb
index 6487f32f7b6..922d0567d99 100644
--- a/lib/gitlab/auth/ldap/user.rb
+++ b/lib/gitlab/auth/ldap/user.rb
@@ -31,15 +31,11 @@ module Gitlab
self.class.find_by_uid_and_provider(auth_hash.uid, auth_hash.provider)
end
- def changed?
+ override :should_save?
+ def should_save?
gl_user.changed? || gl_user.identities.any?(&:changed?)
end
- override :omniauth_should_save?
- def omniauth_should_save?
- changed? && super
- end
-
def block_after_signup?
ldap_config.block_auto_created_users
end