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

Remove a custom validation in the LDAP Group link API

The validation is now done by Grape since 16a8b5c6.
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent a1f5f7c1
......@@ -126,10 +126,6 @@ module API
authorize! :push_code, user_project
end
def validate_access_level?(level)
Gitlab::Access.options_with_owner.values.include? level.to_i
end
def authorize_admin_project
authorize! :admin_project, user_project
end
......
......@@ -18,9 +18,6 @@ module API
post ":id/ldap_group_links" do
group = find_group(params[:id])
authorize! :admin_group, group
unless validate_access_level?(params[:group_access])
render_api_error!("Wrong group access level", 422)
end
ldap_group_link = group.ldap_group_links.new(declared_params(include_missing: false))
if ldap_group_link.save
......
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