summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Pass before_script and script as-is preserving arrayspass-before-script-as-isKamil Trzcinski2017-07-072-1/+4
|
* Merge branch '33657-user-projects-api' into 'master'Rémy Coutable2017-07-062-49/+67
|\ | | | | | | | | | | | | Add user projects API Closes #33657 See merge request !12596
| * Add user projects APIvanadium232017-07-062-49/+67
| |
* | Merge branch '33772-readonly-gitlab-ci-cache' into 'master'Kamil Trzciński2017-07-062-3/+13
|\ \ | | | | | | | | | | | | | | | | | | Introduce cache policies for CI jobs Closes #33772 See merge request !12483
| * | Introduce cache policies for CI jobsNick Thomas2017-07-052-3/+13
| | |
* | | Merge branch '32815--Add-Custom-CI-Config-Path' into 'master'Grzegorz Bizon2017-07-062-0/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Project option to allow customizing CI/CD config path" Closes #32815 and #33130 See merge request !12509
| * \ \ Merge commit 'a8a4ca17e444c761ed9fc5dca4542cfec79abe55' into ↵32815--Add-Custom-CI-Config-PathGrzegorz Bizon2017-07-051-1/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 32815--Add-Custom-CI-Config-Path * commit 'a8a4ca17e444c761ed9fc5dca4542cfec79abe55': Remove IIFEs around several javascript classes Handles realtime with 2 states for environments table Revert "Merge branch '18000-remember-me-for-oauth-login' into 'master'" Disable Flipper memoizer in tests to avoid transient failures fix sidebar padding for full-width items (Time Tracking help) Replace 'snippets/snippets.feature' spinach with rspec 32838 Add wells to admin dashboard overview to fix spacing problems
| * \ \ \ Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2017-07-0521-99/+365
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 32815--Add-Custom-CI-Config-Path * upstream/master: (149 commits) Revert change to design. Go back to scrollable page Fixes the column widths for the new navigation options in settings Migrate #submodule_url_for to Gitaly Add test example for external commit status retries Fix invalid Rails.logger call in lib/gitlab/health_checks/fs_shards_check.rb Fix build for !12300. Log rescued exceptions to Sentry Fix issues with non-UTF8 filenames by always fixing the encoding of tree and blob paths Revert "Merge branch 'revert-12499' into 'master'" Prevent accidental deletion of protected MR source branch by repeating checks before actual deletion Improve the overall UX for the new monitoring dashboard Document that GitLab 9.3 requires the TRIGGER permission on MySQL Instrument Unicorn with Ruby exporter Remove group modal like remove project modal. Closes #33130 Update prometheus client gem Enables the option in user preferences to turn on the new navigation Add Jasmine tests for `OAuthRememberMe` Simplify authentication logic in the v4 users API for !12445. Use stub_application_setting when testing ApplicationHelper#support_url wait_for_requests is not needed when AJAX is not in play ...
| * | | | Rename ci_config_file to ci_config_pathLin Jen-Shin2017-07-052-2/+2
| | | | |
| * | | | Fix various descriptions given the feedbackLin Jen-Shin2017-07-041-1/+1
| | | | |
| * | | | Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2017-07-038-55/+16
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 32815--Add-Custom-CI-Config-Path * upstream/master: (39 commits) Fix rubocop offenses Make entrypoint and command keys to be array of strings Add issuable-list class to shared mr/issue lists to fix new responsive layout New navigation breadcrumbs Restore timeago translations in renderTimeago. Automatically hide sidebar on smaller screens Fix typo in IssuesFinder comment Remove placeholder note when award emoji slash command is applied Make setSidebarHeight more efficient with SidebarHeightManager. Update CHANGELOG.md for 9.3.3 Resolve "More actions dropdown hidden by end of diff" Use Gitaly 0.14.0 Improve support for external issue references Make issuables_count_for_state public Only verifies top position after the request has finished to account for errors Clarify counter caching for users without project access Make finders responsible for counter cache keys Add changelog entry for issue / MR tab counting optimisations Don't count any confidential issues for non-project-members Cache total issue / MR counts for project by user type ...
| * \ \ \ \ Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2017-06-3029-73/+1519
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 32815--Add-Custom-CI-Config-Path * upstream/master: (123 commits) Backport changes to Projects::IssuesController and the search bar bugfix: use `require_dependency` to bring in DeclarativePolicy Resolve "Select branch dropdown is too close to branch name" Clean up issuable lists Defer project destroys within a namespace in Groups::DestroyService#async_execute Fixed new navgiation bar logo height in Safari Resolve "Issue dropdown persists when adding issue number to issue description" Move verification to block level instead of paragraph Revert "Merge branch 'dm-drop-default-scope-on-sortable-finders' into 'master'" Added code for defining SHA attributes Minor edits Job details won't scroll horizontally to show long lines Run mysql tests on stable preperation branches like 9-3-stable-patch-2 Bring back branches badge to main project page optimize translation content based on comments supplement traditional chinese in taiwan translation Inserts exact matches of username, email and name to the top of the user search list Remove Namespace model default scope override and write additional test to Project search optimize translation content based on comments Limit OpenGraph image size to 64x64 ...
| * \ \ \ \ \ Merge remote-tracking branch 'upstream/master' into ↵15041-Add-Custom-CI-Config-PathLin Jen-Shin2017-06-28725-7486/+32320
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 15041-Add-Custom-CI-Config-Path * upstream/master: (12506 commits) Update CHANGELOG.md for 9.3.2 Update architecture.md Fix changelog entry file extension Fix head pipeline stored in merge request for external pipelines updated gitlab-ci.yml to compile locale Ignore JSON files generated from PO files Update mmap2 gem tha disables mmap_obj.gsub! as current implementation uses method that is no longer part of Ruby API Disable rainbow during SimpleExecutor specs to have consistence Slightly refactor pipeline schedules form in preparation for additions Resolve "Submitting reply to existing diff discussion using Cmd/Ctrl+Enter submits twice and refreshes page" Make the SimpleExecutor rescue exceptions in the executing Checks Resolve "Unable to access edit comment from dropdown menu in certain screen sizes" Update changelog item revert removal of requestAnimationFrame and move to a separate MR/discussion rename getEmojiCategoryMap and remove unnecessary parameter Action Buttons on Prio Labels working again by setting pointer events to none on… Remove 'contains' option from Commit.find_all Remove Gitlab::Git::Repository#find_all Use latest chrome and chrome driver in GitLab QA Polish sidebar toggle ...
| * | | | | | | Add config option to project to allow custom .gitlab-ci.yml locationKeith Pope2016-10-082-0/+7
| | | | | | | |
* | | | | | | | Merge branch '32408-allow-creation-of-files-and-dirs-with-spaces-in-web-ui' ↵Douwe Maan2017-07-052-12/+0
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into 'master' Make filename and path creation compatible with UNIX in web UI Closes #21362 See merge request !12608
| * | | | | | | Removes file_name_regex from Gitlab::Regex32408-allow-creation-of-files-and-dirs-with-spaces-in-web-uiTiago Botelho2017-07-052-12/+0
| | | | | | | |
| * | | | | | | Allow creation of files and directories with spaces in web UITiago Botelho2017-07-051-1/+1
| | | | | | | |
* | | | | | | | Create and use project path helpers that only need a project, no namespaceDouwe Maan2017-07-0522-63/+33
| |_|_|_|_|_|/ |/| | | | | |
* | | | | | | Revert "Merge branch '18000-remember-me-for-oauth-login' into 'master'"revert-6df61942Sean McGivern2017-07-051-1/+2
| |_|_|_|_|/ |/| | | | | | | | | | | This reverts merge request !11963
* | | | | | Merge branch '33580-fix-api-scoping' into 'master'Douwe Maan2017-07-057-23/+70
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix API Scoping Closes #33580 and #33022 See merge request !12300
| * \ \ \ \ \ Merge branch 'master' into '33580-fix-api-scoping'Douwe Maan2017-07-0440-160/+1605
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # lib/api/users.rb
| * | | | | | | `AccessTokenValidationService` accepts `String` or `API::Scope` scopes.Timothy Andrew2017-06-302-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-293-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-282-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-282-9/+7
| | | | | | | |
| * | | | | | | Fix remaining spec failures for !12300.Timothy Andrew2017-06-282-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | | 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.
| * | | | | | | Allow API scope declarations to be applied conditionally.Timothy Andrew2017-06-282-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-285-17/+33
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-051-2/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Honor the "Remember me" parameter for OAuth-based login Closes #18000 See merge request !11963
| * | | | | | | Implement review comments for !11963 from @adamniedzielski.Timothy Andrew2017-07-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | | | | | | 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 'gitaly-submodule-url-for' into 'master'Sean McGivern2017-07-051-5/+20
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate #submodule_url_for to Gitaly See merge request !12629
| * | | | | | | | Migrate #submodule_url_for to GitalyJacob Vosmaer2017-07-051-5/+20
| | | | | | | | |
* | | | | | | | | Merge branch 'dm-encode-tree-and-blob-paths' into 'master'Rémy Coutable2017-07-052-0/+8
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix issues with non-UTF8 filenames by always fixing the encoding of tree and blob paths Closes #34529 See merge request !12636
| * | | | | | | | Fix issues with non-UTF8 filenames by always fixing the encoding of tree and ↵dm-encode-tree-and-blob-pathsDouwe Maan2017-07-042-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | blob paths
* | | | | | | | | Merge branch '34544_add_italian_translation_of_i18n' into 'master'34621-add-subgroups-limitations-to-pages-docsDouwe Maan2017-07-041-1/+2
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Italian translation of Cycle Analytics Page & Project Page & Repository Page Closes #34544 See merge request !12578
| * | | | | | | | add Italian translation to I18N黄涛2017-06-301-1/+2
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | translated of Cycle Analytics Page translated of Project Page translated of Repository Page add Changelog Closes #34544
* | | | | | | | Instrument Unicorn with Ruby exporterPaweł Chojnacki2017-07-045-38/+193
| |_|_|_|/ / / |/| | | | | |
* | | | | | | Merge branch '34141-allow-unauthenticated-access-to-the-users-api' into 'master'Rémy Coutable2017-07-041-6/+20
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow unauthenticated access to the `/api/v4/users` API Closes #34141 See merge request !12445
| * | | | | | | Simplify authentication logic in the v4 users API for !12445.Timothy Andrew2017-07-042-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rather than using an explicit check to turn off authentication for the `/users` endpoint, simply call `authenticate_non_get!`. - All `GET` endpoints we wish to restrict already call `authenticated_as_admin!`, and so remain inacessible to anonymous users. - This _does_ open up the `/users/:id` endpoint to anonymous access. It contains the same access check that `/users` users, and so is safe for use here. - More context: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12445#note_34031323
| * | | | | | | Merge remote-tracking branch 'origin/master' into ↵Timothy Andrew2017-06-3044-190/+1672
| |\ \ \ \ \ \ \ | | | |_|_|_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 34141-allow-unauthenticated-access-to-the-users-api - Modify policy code to work with the `DeclarativePolicy` refactor in 37c401433b76170f0150d70865f1f4584db01fa8.
| * | | | | | | Implement review comments for !12445 from @godfat and @rymai.Timothy Andrew2017-06-302-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use `GlobalPolicy` to authorize the users that a non-authenticated user can fetch from `/api/v4/users`. We allow access if the `Gitlab::VisibilityLevel::PUBLIC` visibility level is not restricted. - Further, as before, `/api/v4/users` is only accessible to unauthenticated users if the `username` parameter is passed. - Turn off `authenticate!` for the `/api/v4/users` endpoint by matching on the actual route + method, rather than the description. - Change the type of `current_user` check in `UsersFinder` to be more compatible with EE.
| * | | | | | | Allow unauthenticated access to the `/api/v4/users` API.Timothy Andrew2017-06-262-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The issue filtering frontend code needs access to this API for non-logged-in users + public projects. It uses the API to fetch information for a user by username. - We don't authenticate this API anymore, but instead - if the `current_user` is not present: - Verify that the `username` parameter has been passed. This disallows an unauthenticated user from grabbing a list of all users on the instance. The `UsersFinder` class performs an exact match on the `username`, so we are guaranteed to get 0 or 1 users. - Verify that the resulting user (if any) is accessible to be viewed publicly by calling `can?(current_user, :read_user, user)`
* | | | | | | | Merge branch 'gitaly-clean-up-tests' into 'master'Sean McGivern2017-07-041-1/+1
|\ \ \ \ \ \ \ \ | |_|_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | Clean up Gitaly tests See merge request !12526
| * | | | | | | Add test for GitalyClient::Ref#find_ref_nameJacob Vosmaer2017-07-041-1/+1
| | |/ / / / / | |/| | | | |
* | | | | | | Optimize creation of commit API by using Repository#commit instead of ↵sh-optimize-project-commit-apiStan Hu2017-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Repository#commits Repository#commits is expensive because it has to use Rugged to walk the Git tree as opposed to doing a direct ref lookup. Improves performance in #34533
* | | | | | | Speed up operations performed by gitlab-shellStan Hu2017-07-031-21/+48
| |_|_|/ / / |/| | | | |