summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2019-01-30 09:57:13 +0000
committerDouwe Maan <douwe@gitlab.com>2019-01-30 09:57:13 +0000
commit4dd8740c8afc7039a15237358474b689b6a12308 (patch)
tree54ec3d37e7ec9cbe95015ab9a9f3111377df0ba4 /app/models
parent559364ee67cedadb98c450ba31c2511780f84d57 (diff)
parentab4aba7065b52281fcd1224e1e883fe35128751c (diff)
downloadgitlab-ce-4dd8740c8afc7039a15237358474b689b6a12308.tar.gz
Merge branch 'sh-disable-nil-user-id-identity-validation' into 'master'
Fix failed LDAP logins when nil user_id present Closes #56734 See merge request gitlab-org/gitlab-ce!24749
Diffstat (limited to 'app/models')
-rw-r--r--app/models/identity.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/identity.rb b/app/models/identity.rb
index d63dd432426..acdde4f296b 100644
--- a/app/models/identity.rb
+++ b/app/models/identity.rb
@@ -8,7 +8,7 @@ class Identity < ActiveRecord::Base
validates :provider, presence: true
validates :extern_uid, allow_blank: true, uniqueness: { scope: UniquenessScopes.scopes, case_sensitive: false }
- validates :user_id, uniqueness: { scope: UniquenessScopes.scopes }
+ validates :user, uniqueness: { scope: UniquenessScopes.scopes }
before_save :ensure_normalized_extern_uid, if: :extern_uid_changed?
after_destroy :clear_user_synced_attributes, if: :user_synced_attributes_metadata_from_provider?