Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2015-04-13 12:22:31 +0300
committerJacob Vosmaer <contact@jacobvosmaer.nl>2015-04-13 12:22:31 +0300
commitf64db1fab95751bc2b1cf04641bb031d6289d16b (patch)
tree3fb333172c67424100b70df61c8986c7989339db /db/migrate/20150411000035_fix_identities.rb
parent325b66365bc0bac4c17398dca397cfa30637de24 (diff)
Try to explain what we are doing
Diffstat (limited to 'db/migrate/20150411000035_fix_identities.rb')
-rw-r--r--db/migrate/20150411000035_fix_identities.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20150411000035_fix_identities.rb b/db/migrate/20150411000035_fix_identities.rb
index 93beb046d78..b65ad138b0f 100644
--- a/db/migrate/20150411000035_fix_identities.rb
+++ b/db/migrate/20150411000035_fix_identities.rb
@@ -1,5 +1,14 @@
class FixIdentities < ActiveRecord::Migration
def up
+ # Up until now, legacy 'ldap' references in the database were charitably
+ # interpreted to point to the first LDAP server specified in the GitLab
+ # configuration. So if the database said 'provider: ldap' but the first
+ # LDAP server was called 'ldapmain', then we would try to interpret
+ # 'provider: ldap' as if it said 'provider: ldapmain'. This migration (and
+ # accompanying changes in the GitLab LDAP code) get rid of this complicated
+ # behavior. Any database references to 'provider: ldap' get rewritten to
+ # whatever the code would have interpreted it as, i.e. as a reference to
+ # the first LDAP server specified in gitlab.yml / gitlab.rb.
new_provider = Gitlab.config.ldap.servers.first.last['provider_name']
# Delete duplicate identities