summaryrefslogtreecommitdiff
path: root/lib/gitlab
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'zj-issue-search-slash-command' into 'master' Kamil Trzciński2016-11-294-8/+20
|\ | | | | | | | | Add issue search slash command See merge request !7752
| * Add issue search slash commandzj-issue-search-slash-commandZ.J. van de Weg2016-11-254-8/+20
| | | | | | | | One of many requested in: gitlab-org/gitlab-ce#24768
* | Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security' Douwe Maan2016-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace issue access checks with use of IssuableFinder Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867 ## Which fixes are in this MR? :warning: - Potentially untested :bomb: - No test coverage :traffic_light: - Test coverage of some sort exists (a test failed when error raised) :vertical_traffic_light: - Test coverage of return value (a test failed when nil used) :white_check_mark: - Permissions check tested ### Issue lookup with access check Using `visible_to_user` likely makes these security issues too. See [Code smells](#code-smells). - [x] :vertical_traffic_light: app/finders/notes_finder.rb:15 [`visible_to_user`] - [x] :traffic_light: app/views/layouts/nav/_project.html.haml:73 [`visible_to_user`] [`.count`] - [x] :white_check_mark: app/services/merge_requests/build_service.rb:84 [`issue.try(:confidential?)`] - [x] :white_check_mark: lib/api/issues.rb:112 [`visible_to_user`] - CHANGELOG: Prevented API returning issues set to 'Only team members' to everyone - [x] :white_check_mark: lib/api/helpers.rb:126 [`can?(current_user, :read_issue, issue)`] Maybe here too? - [x] :white_check_mark: lib/gitlab/search_results.rb:53 [`visible_to_user`] ### Previous discussions - [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b2ff264eddf9819d7693c14ae213d941494fe2b3_128_126 - [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#7b6375270d22f880bdcb085e47b519b426a5c6c7_87_87 See merge request !2031
* | Merge branch 'refresh-authorizations-with-lease' into 'master' Douwe Maan2016-11-281-7/+0
|\ \ | | | | | | | | | | | | | | | | | | Refresh project authorizations using a Redis lease This MR changes `User#refresh_authorized_projects` so it uses a Redis lease instead of relying on serializable transactions. See the commit message(s) for more details. See merge request !7733
| * | Refresh project authorizations using a Redis leaserefresh-authorizations-with-leaseYorick Peterse2016-11-251-7/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I proposed using serializable transactions I was hoping we would be able to refresh data of individual users concurrently. Unfortunately upon closer inspection it was revealed this was not the case. This could result in a lot of queries failing due to serialization errors, overloading the database in the process (given enough workers trying to update the target table). To work around this we're now using a Redis lease that is cancelled upon completion. This ensures we can update the data of different users concurrently without overloading the database. The code will try to obtain the lease until it succeeds, waiting at least 1 second between retries. This is necessary as we may otherwise end up _not_ updating the data which is not an option.
* | Merge branch 'timeout-merge-request-for-binary-file' into 'master' Yorick Peterse2016-11-251-3/+3
|\ \ | | | | | | | | | | | | Fix: Timeout creating and viewing merge request for binary file See merge request !7713
| * | Fix: Timeout creating and viewing merge request for binary filetimeout-merge-request-for-binary-fileValery Sizov2016-11-251-3/+3
| | |
* | | Accept a valid ref for issue showZ.J. van de Weg2016-11-251-1/+1
| |/ |/| | | | | | | For example, now we support `/gitlab issue show #1`. Where the # used to trip the regex.
* | Merge branch 'dz-allow-nested-group-routing' into 'master' Douwe Maan2016-11-241-2/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add nested groups support to the routing ## What does this MR do? It allows routing with `/` in namespace name ## Why was this MR needed? For nested groups feature(https://gitlab.com/gitlab-org/gitlab-ce/issues/2772). We need URI like `/group/subgroup/project` be routed correctly ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - ~~API support added~~ - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/2772 See merge request !7459
| * | Add nested groups support to the routingdz-allow-nested-group-routingDmitriy Zaporozhets2016-11-231-2/+12
| | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | Use Commit#author so we share logic and cacheLin Jen-Shin2016-11-241-4/+2
| |/ |/| | | | | Closes #24900
* | Merge branch 'post_receive-any-email' into 'master' Sean McGivern2016-11-231-1/+1
|\ \ | | | | | | | | | | | | post_receive: accept any user email from last commit See merge request !7225
| * | post_receive: accept any user email from last commitElan Ruusamäe2016-11-041-1/+1
| | |
* | | Merge branch 'fix-ee_compat_check-when-branch-contains-a-slash' into 'master' Rémy Coutable2016-11-231-2/+6
|\ \ \ | | | | | | | | | | | | | | | | Ensure we sanitize branch names with path-unfriendly characters See merge request !7696
| * | | Ensure we sanitize branch names with path-unfriendly charactersRémy Coutable2016-11-231-2/+6
| | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | Merge branch 'fix/cycle-analytics-plan-issue' into 'master' Douwe Maan2016-11-232-1/+3
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix cycle analytics plan stage when commits are missing Takes into account when commits are `nil` so the app doesn't throw an exception and also removes them. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/24836 - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !7694
| * | | Fix and relevant spec for plan stage breaking with nil commitsfix/cycle-analytics-plan-issueJames Lopez2016-11-232-1/+3
| | |/ | |/|
* | | Merge branch 'zj-fix-trailing-whitespace-issue-create' into 'master' Kamil Trzciński2016-11-221-2/+4
|\ \ \ | |/ / |/| | | | | | | | Issue creation now accepts trailing whitespace See merge request !7633
| * | Issue creation now accepts trailing whitespacezj-fix-trailing-whitespace-issue-createZ.J. van de Weg2016-11-221-2/+4
| | |
* | | Merge branch 'fix/ci-linter-undefined-error' into 'master' Kamil Trzciński2016-11-221-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix undefined error in CI linter ## What does this MR do? This MR fixes undefined error in CI linter. ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - [x] Tests added for this feature/bug ## What are the relevant issue numbers? Closes #24759 See merge request !7650
| * | Fix entry lookup in CI config inheritance rulesGrzegorz Bizon2016-11-221-1/+1
| | |
* | | Merge branch 'improve-deploy-message' into 'master' Kamil Trzciński2016-11-211-1/+14
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve deploy message ## What does this MR do? Improves deploy message to make it more descriptive and useable then what is already offered by deploy command. ## Does this MR meet the acceptance criteria? - [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if it does - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? See merge request !7629
| * | | Improve deploy command messageKamil Trzcinski2016-11-211-1/+14
| | | |
* | | | Merge branch 'dz-fix-500-group-git' into 'master' Sean McGivern2016-11-211-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix 500 error when group name ends with git Closes https://gitlab.com/gitlab-com/support-forum/issues/1298 Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/24742 See merge request !7630
| * | | | Fix 500 error when group name ends with gitDmitriy Zaporozhets2016-11-211-1/+1
| | |/ / | |/| | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | | Merge branch 'chatops-deploy-command' into 'master' Rémy Coutable2016-11-213-0/+50
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add deploy chat command This adds a new ChatOps command: ``` /trigger deploy <environment> to <environment> ``` See merge request !7619
| * | | Introduce deploy command that allows to start deployment from one ↵chatops-deploy-commandKamil Trzcinski2016-11-212-5/+16
| | | | | | | | | | | | | | | | environment to second one
| * | | Add deploy chat command [ci skip]Kamil Trzcinski2016-11-212-0/+39
| |/ /
* | | Merge branch 'feature/send-registry-address-with-build-payload' into 'master' Kamil Trzciński2016-11-213-0/+64
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Send registry address with build payload ## What does this MR do? Adds `registry_url` as a part of a build payload, when sending a response to a GitLab Runner which requested a new build. ## Are there points in the code the reviewer needs to double check? Change in `lib/ci/api/entities.rb`. ## Why was this MR needed? This is one of the steps needed to add support for private/protected registries hosted with GitLab CE/EE. ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if it does - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Related to gitlab-org/gitlab-ci-multi-runner#1828, gitlab-org/gitlab-ci-multi-runner!386, gitlab-org/gitlab-ci-multi-runner#1434 See merge request !7474
| * | | Add Gitlab::Ci::Build::Credentials module with build credentials abstractionTomasz Maczukin2016-11-214-16/+64
| | | |
| * | | Send credentials array with build dataTomasz Maczukin2016-11-211-0/+16
| | | |
* | | | Merge branch 'smarter-cache-invalidation' into 'master' Sean McGivern2016-11-211-0/+63
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Smarter cache invalidation Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23550 See merge request !7360
| * | | | Unify detecting of special repository filesYorick Peterse2016-11-211-0/+63
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the logic of detecting special repository files (e.g. a README or a Koding configuration file) to a single class: Gitlab::FileDetector. Moving this logic into a single place allows this to be re-used more easily. This commit also changes Repository#gitlab_ci_yaml so that its cached similar to other data (e.g. the Koding configuration file).
* | | | refactored a couple of things based on feedbackfix/cycle-analytics-permissionsJames Lopez2016-11-211-12/+7
| | | |
* | | | Added permissions per stage to cycle analytics endpointJames Lopez2016-11-211-0/+49
|/ / /
* | | Merge branch 'fix/require-build-script-configuration-entry' into 'master' issues-copyKamil Trzciński2016-11-193-24/+51
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make job script a required configuration entry ## What does this MR do? This MR makes a job script a required configuration entry. ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - Tests - [x] Added for this feature/bug - [x] All builds are passing ## What are the relevant issue numbers? Closes #24575 See merge request !7566
| * | | Remove CI config helper with same name as an entryGrzegorz Bizon2016-11-182-8/+35
| | | |
| * | | Make CI job script a required configuration entryGrzegorz Bizon2016-11-181-16/+16
| | | |
* | | | Merge branch 'feature/precalculate-authorized-projects' into 'master' Douwe Maan2016-11-181-0/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Precalculate authorized projects in database ## What does this MR do? It caches user's authorized projects in database instead of using multiple unions, which should simplify and speed-up things since this operation (getting authorized projects) is used a lot. ## Are there points in the code the reviewer needs to double check? Did we miss a scenario where we need to refresh the list of projects? ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [ ] ~~API support added~~ - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? #23150 See merge request !6839
| * | | | Precalculate user's authorized projects in databaseAhmad Sherif2016-11-181-0/+7
| | | | | | | | | | | | | | | | | | | | Closes #23150
* | | | | Merge branch 'zj-slash-commands-mattermost' into 'master' Kamil Trzciński2016-11-185-0/+168
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Slash command for mattermost Closes #22540 ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) See merge request !7438
| * | | | | Improve style, add more testsZ.J. van de Weg2016-11-181-3/+3
| | | | | |
| * | | | | Merge remote-tracking branch 'origin/master' into zj-slash-commands-mattermostZ.J. van de Weg2016-11-172-1/+2
| |\ \ \ \ \
| * | | | | | More refactoring, push present to base commandZ.J. van de Weg2016-11-174-25/+31
| | | | | | |
| * | | | | | Add tests for increased converageZ.J. van de Weg2016-11-174-15/+17
| | | | | | |
| * | | | | | Remove some commands for nowZ.J. van de Weg2016-11-176-73/+5
| | | | | | |
| * | | | | | Incorporate feedback, improve presenter classZ.J. van de Weg2016-11-176-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
| * | | | | | Rename from service, and move to lib/gitlabZ.J. van de Weg2016-11-179-0/+222
| | | | | | |
| * | | | | | Add most of specs for chat namesKamil Trzcinski2016-11-171-1/+1
| | | | | | |
| * | | | | | Create relation between chat user and GitLab user and allow to authorize ↵Kamil Trzcinski2016-11-171-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | them [ci skip]