Move LDAP sync API to EE::API::Groups

This moves the LDAP sync API endpoint from API::Groups to
EE::API::Groups.
parent fcdf6fbf
......@@ -52,6 +52,22 @@ module EE
super
end
end
resource :groups, requirements: ::API::API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
desc 'Sync a group with LDAP.'
post ":id/ldap_sync" do
not_found! unless ::Gitlab::Auth::LDAP::Config.group_sync_enabled?
group = find_group!(params[:id])
authorize! :admin_group, group
if group.pending_ldap_sync
::LdapGroupSyncWorker.perform_async(group.id)
end
status 202
end
end
end
end
end
......
......@@ -290,20 +290,6 @@ module API
render_api_error!("Failed to transfer project #{project.errors.messages}", 400)
end
end
desc 'Sync a group with LDAP.'
post ":id/ldap_sync" do
not_found! unless Gitlab::Auth::LDAP::Config.group_sync_enabled?
group = find_group!(params[:id])
authorize! :admin_group, group
if group.pending_ldap_sync
LdapGroupSyncWorker.perform_async(group.id)
end
status 202
end
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment