Commit ec7485de authored by Robert Schilling's avatar Robert Schilling

Grapify the settings API

parent b93c72e3
...@@ -79,6 +79,7 @@ PUT /application/settings ...@@ -79,6 +79,7 @@ PUT /application/settings
| `enabled_git_access_protocol` | string | no | Enabled protocols for Git access. Allowed values are: `ssh`, `http`, and `nil` to allow both protocols. | | `enabled_git_access_protocol` | string | no | Enabled protocols for Git access. Allowed values are: `ssh`, `http`, and `nil` to allow both protocols. |
| `koding_enabled` | boolean | no | Enable Koding integration. Default is `false`. | | `koding_enabled` | boolean | no | Enable Koding integration. Default is `false`. |
| `koding_url` | string | yes (if `koding_enabled` is `true`) | The Koding instance URL for integration. | | `koding_url` | string | yes (if `koding_enabled` is `true`) | The Koding instance URL for integration. |
| `disabled_oauth_sign_in_sources` | Array of strings | no | Disabled OAuth sign-in sources |
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/application/settings?signup_enabled=false&default_project_visibility=1 curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/application/settings?signup_enabled=false&default_project_visibility=1
......
This diff is collapsed.
...@@ -44,8 +44,7 @@ describe API::Settings, 'Settings', api: true do ...@@ -44,8 +44,7 @@ describe API::Settings, 'Settings', api: true do
put api("/application/settings", admin), koding_enabled: true put api("/application/settings", admin), koding_enabled: true
expect(response).to have_http_status(400) expect(response).to have_http_status(400)
expect(json_response['message']).to have_key('koding_url') expect(json_response['error']).to eq('koding_url is missing')
expect(json_response['message']['koding_url']).to include "can't be blank"
end end
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