Commit 9887ff42 authored by Sean McGivern's avatar Sean McGivern

Merge branch '972-remove-custom-api-validation' into 'master'

Remove a custom validation in the LDAP Group link API

Closes #972

See merge request !1026
parents 723788a0 ed10b9e6
......@@ -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