Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f4c64d44
Commit
f4c64d44
authored
Oct 16, 2014
by
Jan-Willem van der Meer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate LDAP users as well
parent
7d3976ee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
lib/tasks/migrate/ldap.rake
lib/tasks/migrate/ldap.rake
+6
-1
No files found.
lib/tasks/migrate/ldap.rake
View file @
f4c64d44
...
@@ -9,6 +9,11 @@ namespace :gitlab do
...
@@ -9,6 +9,11 @@ namespace :gitlab do
unmigrated_group_links
=
LdapGroupLink
.
where
(
'provider IS NULL OR provider NOT IN (?)'
,
config
.
providers
)
unmigrated_group_links
=
LdapGroupLink
.
where
(
'provider IS NULL OR provider NOT IN (?)'
,
config
.
providers
)
puts
"found
#{
unmigrated_group_links
.
count
}
unmigrated LDAP links"
puts
"found
#{
unmigrated_group_links
.
count
}
unmigrated LDAP links"
puts
"setting provider to
#{
provider
}
"
puts
"setting provider to
#{
provider
}
"
unmigrated_group_links
.
update_all
(
provider:
provider
)
unmigrated_group_links
.
update_all
provider:
provider
unmigrated_ldap_users
=
User
.
where
(
provider:
'ldap'
)
puts
"found
#{
unmigrated_ldap_users
.
count
}
unmigrated LDAP users"
puts
"setting provider to
#{
provider
}
"
unmigrated_ldap_users
.
update_all
provider:
provider
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment