Commit Graph

11 Commits

Author SHA1 Message Date
Valery Sizov 387c4b2c21 Backport of multiple_assignees_feature [ci skip] 2017-05-04 17:11:53 +03:00
Z.J. van de Weg 128b1eae09 Update Rubocop to ruby 2.3 2017-02-07 15:16:46 +01:00
Adam Niedzielski b11492c2e3 Use cached values to compute total issues count in milestone index pages
Milestoneish#issues_visible_to_user caches only the ActiveRecord relation,
not the actual result.
Introduce Milestoneish#total_issues_count that relies on the cached method
Milestoneish#count_issues_by_state to reduce the number of queries.
2017-01-10 13:30:28 -05:00
Adam Niedzielski f13c650c16 Speed up group milestone index by passing group_id to IssuesFinder 2017-01-06 13:47:18 +01:00
James Edwards-Jones 27c936adf9 Milestoneish SQL performance partially improved and memoized
Memoize Milestoneish#issues_visible_to_user and counts to reduce lookups
Milstoneish SQL optimised with project, but still slow on GlobalMilestone
2016-12-20 12:45:29 +00:00
Sean McGivern 4bf61b8bd4 Merge branch 'jej-24637-move-issue-visible_to_user-to-finder' into 'security'
Issue#visible_to_user moved to IssuesFinder

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/24637.

See merge request !2039
2016-12-15 11:41:04 -03:00
Douwe Maan f23b1cb453 Merge branch 'jej-23867-use-mr-finder-instead-of-access-check' into 'security'
Replace MR access checks with use of MergeRequestsFinder

Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867

⚠️ - Potentially untested
💣 - No test coverage
🚥 - Test coverage of some sort exists (a test failed when error raised)
🚦 - Test coverage of return value (a test failed when nil used)
 - Permissions check tested

- [x] 💣  app/finders/notes_finder.rb:17
- [x] ⚠️  app/views/layouts/nav/_project.html.haml:80 [`.count`]
- [x] 💣  app/controllers/concerns/creates_commit.rb:84
- [x] 🚥  app/controllers/projects/commits_controller.rb:24
- [x] 🚥  app/controllers/projects/compare_controller.rb:56
- [x] 🚦  app/controllers/projects/discussions_controller.rb:29
- [x]   app/controllers/projects/todos_controller.rb:27
- [x] 🚦  app/models/commit.rb:268
- [x]  lib/gitlab/search_results.rb:71

- [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#d1c10892daedb4d4dd3d4b12b6d071091eea83df_267_266 Memoize ` merged_merge_request(current_user)`
- [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#d1c10892daedb4d4dd3d4b12b6d071091eea83df_248_247 Expected side effect for `merged_merge_request!`, consider `skip_authorization: true`.
- [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#d1c10892daedb4d4dd3d4b12b6d071091eea83df_269_269 Scary use  of unchecked `merged_merge_request?`

See merge request !2033
2016-12-08 21:42:07 -03:00
Valery Sizov 3789cfe056 Add a starting date to milestones 2016-11-23 13:41:04 +02:00
Arinde Eniola ded3b02f33 Use a better message when milestone is newly created
make some changes for the checks to determine when the messages should be displayed

add item to changelog and also integration test

make some changes to the test

make some changes
2016-04-29 10:15:49 +01:00
Douglas Barbosa Alexandre 482bfd1a6d Restrict access for confidential issues on milestone view 2016-03-17 20:55:59 -03:00
Rubén Dávila 95b06a62c0 Updates from last code review. 2016-03-06 23:07:19 -05:00