Commit 72412d84 authored by Patricio Cano's avatar Patricio Cano

Made the `provider` argument a required one, since the feature wasn't working...

Made the `provider` argument a required one, since the feature wasn't working properly if no provider was given. Related to #329
parent 39da3fa5
......@@ -190,7 +190,7 @@ Parameters:
- `id` (required) - The ID of a group
- `cn` (required) - The CN of a LDAP group
- `group_access` (required) - Minimum access level for members of the LDAP group
- `provider` (optional) - LDAP provider for the LDAP group (when using several providers)
- `provider` (required) - LDAP provider for the LDAP group (when using several providers)
### Delete LDAP group link
......
......@@ -11,14 +11,14 @@ module API
# id (required) - The ID of a group
# cn (required) - The CN of a LDAP group
# group_access (required) - Level of permissions for the linked LDAP group
# provider (optional) - the LDAP provider for this LDAP group
# provider (required) - the LDAP provider for this LDAP group
#
# Example Request:
# POST /groups/:id/ldap_group_links
post ":id/ldap_group_links" do
group = find_group(params[:id])
authorize! :admin_group, group
required_attributes! [:cn, :group_access]
required_attributes! [:cn, :group_access, :provider]
unless validate_access_level?(params[:group_access])
render_api_error!("Wrong group access level", 422)
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