summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fix docsfeature/user-agent-details-apiJames Lopez2017-07-062-2/+6
|
* fix specJames Lopez2017-07-051-0/+1
|
* add missing changelogJames Lopez2017-07-051-0/+4
|
* add API documentationJames Lopez2017-07-052-0/+49
|
* add user agent details API endpoints to issues and snippetsJames Lopez2017-07-053-1/+35
|
* add snippets specJames Lopez2017-07-051-1/+21
|
* add issues spec and user agent details to entitiesJames Lopez2017-07-052-0/+25
|
* Merge branch '32838-admin-panel-spacing' into 'master'Annabel Dunstone Gray2017-07-053-161/+179
|\ | | | | | | | | | | | | 32838 Add wells to admin dashboard overview to fix spacing problems Closes #32838 See merge request !12467
| * 32838 Add wells to admin dashboard overview to fix spacing problems32838-admin-panel-spacingtauriedavis2017-06-283-161/+179
| |
* | Merge branch '33580-fix-api-scoping' into 'master'Douwe Maan2017-07-0515-41/+291
|\ \ | | | | | | | | | | | | | | | | | | Fix API Scoping Closes #33580 and #33022 See merge request !12300
| * | Fix build for !12300.Timothy Andrew2017-07-051-14/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | - The `/users` and `/users/:id` APIs are now accessible without authentication (!12445), and so scopes are not relevant for these endpoints. - Previously, we were testing our scope declaration against these two methods. This commit moves these tests to other `GET` user endpoints which still require authentication.
| * | Merge branch 'master' into '33580-fix-api-scoping'Douwe Maan2017-07-04522-5990/+16017
| |\ \ | | | | | | | | | | | | # Conflicts: # lib/api/users.rb
| * | | `AccessTokenValidationService` accepts `String` or `API::Scope` scopes.Timothy Andrew2017-06-304-9/+15
| | | | | | | | | | | | | | | | | | | | - There's no need to use `API::Scope` for scopes that don't have `if` conditions, such as in `lib/gitlab/auth.rb`.
| * | | Extract a `Gitlab::Scope` class.Timothy Andrew2017-06-295-24/+42
| | | | | | | | | | | | | | | | | | | | - To represent an authorization scope, such as `api` or `read_user` - This is a better abstraction than the hash we were previously using.
| * | | Implement review comments from @DouweM for !12300.Timothy Andrew2017-06-284-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use a struct for scopes, so we can call `scope.if` instead of `scope[:if]` - Refactor the "remove scopes whose :if condition returns false" logic to use a `select` rather than a `reject`.
| * | | Implement review comments from @dbalexandre for !12300.Timothy Andrew2017-06-283-22/+18
| | | |
| * | | Fix remaining spec failures for !12300.Timothy Andrew2017-06-286-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Get the spec for `lib/gitlab/auth.rb` passing. - Make the `request` argument to `AccessTokenValidationService` optional - `auth.rb` doesn't need to pass in a request. - Pass in scopes in the format `[{ name: 'api' }]` rather than `['api']`, which is what `AccessTokenValidationService` now expects. 2. Get the spec for `API::V3::Users` passing 2. Get the spec for `AccessTokenValidationService` passing
| * | | Add CHANGELOG entry for CE MR 12300Timothy Andrew2017-06-281-0/+4
| | | |
| * | | Test OAuth token scope verification in the `API::Users` endpointTimothy Andrew2017-06-283-14/+71
| | | |
| * | | When verifying scopes, manually include scopes from `API::API`.Timothy Andrew2017-06-282-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - They are not included automatically since `API::Users` does not inherit from `API::API`, as I initially assumed. - Scopes declared in `API::API` are considered global (to the API), and need to be included in all cases.
| * | | Test `/users` endpoints for the `read_user` scope.Timothy Andrew2017-06-284-34/+78
| | | | | | | | | | | | | | | | | | | | | | | | - Test `GET` endpoints to check that the scope is allowed. - Test `POST` endpoints to check that the scope is disallowed. - Test both `v3` and `v4` endpoints.
| * | | Allow API scope declarations to be applied conditionally.Timothy Andrew2017-06-286-16/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Scope declarations of the form: allow_access_with_scope :read_user, if: -> (request) { request.get? } will only apply for `GET` requests - Add a negative test to a `POST` endpoint in the `users` API to test this. Also test for this case in the `AccessTokenValidationService` unit tests.
| * | | Initial attempt at refactoring API scope declarations.Timothy Andrew2017-06-288-20/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Declaring an endpoint's scopes in a `before` block has proved to be unreliable. For example, if we're accessing the `API::Users` endpoint - code in a `before` block in `API::API` wouldn't be able to see the scopes set in `API::Users` since the `API::API` `before` block runs first. - This commit moves these declarations to the class level, since they don't need to change once set.
* | | | Merge branch '18000-remember-me-for-oauth-login' into 'master'Sean McGivern2017-07-0512-4/+258
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Honor the "Remember me" parameter for OAuth-based login Closes #18000 See merge request !11963
| * | | | Add Jasmine tests for `OAuthRememberMe`Timothy Andrew2017-07-042-0/+31
| | | | |
| * | | | Fix build for !11963.Timothy Andrew2017-07-033-24/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't use `request.env['omniauth.params']` if it isn't present. - Remove the `saml` section from the `gitlab.yml` test section. Some tests depend on this section not being initially present, so it can be overridden in the test. This MR doesn't add any tests for SAML, so we didn't really need this in the first place anyway. - Clean up the test -> omniauth section of `gitlab.yml`
| * | | | Implement review comments for !11963 from @filipa.Timothy Andrew2017-07-032-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Disable an ESLint check rather than work around it (by converting `OAuthRememberMe` from a regular class to a static class. - Scope `$` calls inside `OAuthRememberMe`
| * | | | Implement review comments for !11963 from @adamniedzielski.Timothy Andrew2017-07-035-19/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Change double quotes to single quotes. - Why is `OmniAuth.config.full_host` being reassigned in the integration test? - Use `map` over `map!` to avoid `dup` in the `gitlab:info` rake task - Other minor changes
| * | | | Don't allow the `gitlab:env:info` rake task to mutate the list of omniauth ↵Timothy Andrew2017-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | providers. - The test for `rake gitlab:env:info` executed the rake task, which mutated the list of omniauth providers, breaking subsequent tests relying on this list. - I've changed the rake task to duplicate the providers list before modifying it.
| * | | | Add CHANGELOG entry for CE MR 11963Timothy Andrew2017-07-031-0/+4
| | | | |
| * | | | Get ESLint spec passing for the `OAuthRememberMe` class.Timothy Andrew2017-07-031-6/+6
| | | | |
| * | | | Add Omniauth OAuth config to the test section of `gitlab.yml`Timothy Andrew2017-07-032-51/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - I tried to get this to work by stubbing out portions of the config within the test. This didn't work as expected because Devise/Omniauth loaded before the stub could run, and the stubbed config was ignored. - I attempted to fix this by reloading Devise/Omniauth after stubbing the config. This successfully got Devise to load the stubbed providers, but failed while trying to access a route such as `user_gitlab_omniauth_authorize_path`. - I spent a while trying to figure this out (even trying `Rails.application.reload_routes!`), but nothing seemed to work. - I settled for adding this config directly to `gitlab.yml` rather than go down this path any further.
| * | | | Add more providers to the OAuth login integration tests.Timothy Andrew2017-07-031-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | - Added saml, authentiq, cas3, and auth0 - Crowd seems to be a special case that will be handled separately.
| * | | | Move OAuth "remember me" javascript logic into a class.Timothy Andrew2017-07-033-14/+33
| | | | |
| * | | | Test the "Remember Me" flow for OAuth-based login.Timothy Andrew2017-07-033-3/+68
| | | | |
| * | | | Add integration tests around OAuth login.Timothy Andrew2017-07-033-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - There was previously a test for `saml` login in `login_spec`, but this didn't seem to be passing. A lot of things didn't seem right here, and I suspect that this test hasn't been running. I'll investigate this further. - It took almost a whole working day to figure out this line: OmniAuth.config.full_host = ->(request) { request['REQUEST_URI'].sub(request['REQUEST_PATH'], '') } As always, it's obvious in retrospect, but it took some digging to figure out tests were failing and returning 404s during the callback phase. - Test all OAuth providers - github, twitter, bitbucket, gitlab, google, and facebook
| * | | | Implement "remember me" for OAuth-based login.Timothy Andrew2017-07-032-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Pass a `remember_me` query parameter along with the initial OAuth request, and pick this parameter up during the omniauth callback from request.env['omniauth.params']` - For 2FA-based login, copy the `remember_me` param from `omniauth.params` to `params`, which the 2FA process will pick up. - For non-2FA-based login, simply call the `remember_me` devise method to set the session cookie.
* | | | | Merge branch '34648-use-stub_application_setting-to-test-support_url' into ↵Sean McGivern2017-07-051-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Use stub_application_setting when testing ApplicationHelper#support_url Closes #34648 See merge request !12627
| * | | | | Use stub_application_setting when testing ApplicationHelper#support_url34648-use-stub_application_setting-to-test-support_urlRémy Coutable2017-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | Merge branch 'new-nav-column-fix' into 'master'Filipa Lacerda2017-07-051-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the column widths for the new navigation option See merge request !12644
| * | | | | | Fixes the column widths for the new navigation options in settingsPhil Hughes2017-07-051-2/+2
| | | | | | |
* | | | | | | Merge branch 'sh-fix-bad-rails-logger' into 'master'Rémy Coutable2017-07-051-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix invalid Rails.logger call in lib/gitlab/health_checks/fs_shards_check.rb See merge request !12641
| * | | | | | | Fix invalid Rails.logger call in lib/gitlab/health_checks/fs_shards_check.rbsh-fix-bad-rails-loggerStan Hu2017-07-041-1/+1
| | | | | | | |
* | | | | | | | Merge branch 'sh-log-application-controller-exceptions-sentry' into 'master'Rémy Coutable2017-07-052-0/+6
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Log rescued exceptions to Sentry See merge request !12638
| * | | | | | | | Log rescued exceptions to Sentrysh-log-application-controller-exceptions-sentryStan Hu2017-07-042-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support noticed that a number of exceptions, such as "Encoding::CompatibilityError (incompatible character encodings: UTF-8 and ASCII-8BIT)", failed to report to Sentry. The `rescue_from` in the ApplicationController prevented these exceptions from being recorded. This change ensures that these exceptions are properly captured.
* | | | | | | | | Merge branch 'feature/gb/add-test-example-for-commit-status-retries' into ↵Sean McGivern2017-07-051-0/+22
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Add test example for external commit status retries See merge request !12642
| * | | | | | | | | Add test example for external commit status retriesfeature/gb/add-test-example-for-commit-status-retriesGrzegorz Bizon2017-07-051-0/+22
| | | | | | | | | |
* | | | | | | | | | Merge branch 'fix/gb/improve-stage-id-foreign-key-migration' into 'master'Kamil Trzciński2017-07-053-10/+41
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve stage_id foreign key migration Closes #34495 See merge request !12617
| * \ \ \ \ \ \ \ \ \ Merge branch 'master' into 'fix/gb/improve-stage-id-foreign-key-migration'fix/gb/improve-stage-id-foreign-key-migrationGrzegorz Bizon2017-07-0429-72/+383
| |\ \ \ \ \ \ \ \ \ \ | | | |_|_|_|/ / / / / | | |/| | | | | | | | | | | | | | | | | | | # Conflicts: # db/schema.rb
| * | | | | | | | | | Check foreign keys in migration in separate conditionalGrzegorz Bizon2017-07-041-1/+15
| | | | | | | | | | |