Commit a3630058 authored by Rémy Coutable's avatar Rémy Coutable

Move the #require_ldap_enabled method to Groups::LdapGroupLinksController

It's only used here so there's no point having it in
ApplicationController!
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent f19caa89
......@@ -232,12 +232,6 @@ class ApplicationController < ActionController::Base
end
end
def require_ldap_enabled
unless Gitlab.config.ldap.enabled
render_404 and return
end
end
def set_filters_params
set_default_sort
......
......@@ -31,6 +31,12 @@ class Groups::LdapGroupLinksController < Groups::ApplicationController
private
def require_ldap_enabled
unless Gitlab.config.ldap.enabled
render_404 and return
end
end
def ldap_group_link_params
params.require(:ldap_group_link).permit(:cn, :group_access, :provider)
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