Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-09-26Remove `weight` from IssuableFinder::SCALAR_PARAMS and improve the array ↵Rémy Coutable
formatting Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-09-26Backport part of c777bb91fd7 and 4074cb3b7c16 from EERémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-09-18fix #35290 Make read-only API for public merge requests available without ↵haseeb
authentication
2017-09-05Re-use issue/MR counts for the pagination systemYorick Peterse
This changes the issue and MR index pages so the pagination system re-uses the output of the COUNT(*) query used to calculate the number of rows per state (opened, closed, etc). This removes the need for an additional COUNT(*) on both pages.
2017-08-31Remove issuable finder count cachingSean McGivern
We're going to cache the total open count separately, and then just perform these counts on the list. We already do that to get the pagination information, through Kaminari, and a future change will make Kaminari reuse the query results from earlier in the request.
2017-08-30Add filter by my reactionHiroyuki Sato
2017-07-28Merge issuable "reopened" state into "opened"Yorick Peterse
Having two states that essentially mean the same thing is very much like having a boolean "true" and boolean "mostly-true": it's rather silly. This commit merges the "reopened" state into the "opened" state while taking care of system notes still showing messages along the lines of "Alice reopened this issue". A big benefit from having only two states (opened and closed) is that indexing and querying becomes simpler and more performant. For example, to get all the opened queries we no longer have to query both states: SELECT * FROM issues WHERE project_id = 2 AND state IN ('opened', 'reopened'); Instead we can query a single state directly, which can be much faster: SELECT * FROM issues WHERE project_id = 2 AND state = 'opened'; Further, only having two states makes indexing easier as we will only ever filter (and thus scan an index) using a single value. Partial indexes could help but aren't supported on MySQL, complicating the development process and not being helpful for MySQL.
2017-07-24Add author_id & assignee_id param to /issues APIToon Claes
Allow issues filtering on `author_id` and `assignee_id`.
2017-07-19Clear issuable counter caches on updateSean McGivern
When an issuable's state changes, or one is created, we should clear the cache counts for a user's assigned issuables, and also the project-wide caches for this user type.
2017-07-19Fix issuable state cachingSean McGivern
We were including controller params in the cache key, so the key for the header didn't match the one for the list itself!
2017-07-19Fix issuable state counter cache keysSean McGivern
These cache a hash of counts by state, so the state isn't needed in the key itself.
2017-07-07Merge branch 'feature/user-datetime-search-api-mysql' into 'master'Douwe Maan
Add creation time filters to user search API for admins Closes #29507 See merge request !12682
2017-07-07refactor created at filter to use model scopesJames Lopez
2017-07-07Native group milestonesFelipe Artur
2017-07-07refactor filtersJames Lopez
2017-06-30Make finders responsible for counter cache keysSean McGivern
2017-06-30Don't count any confidential issues for non-project-membersSean McGivern
2017-06-19add since and until params to issuablesKyle Bishop
2017-05-04Backport of multiple_assignees_feature [ci skip]Valery Sizov
2017-04-06ProjectsFinder should handle more optionsJacopo
Extended ProjectFinder in order to handle the following options: - current_user - which user use - project_ids_relation: int[] - project ids to use - params: - trending: boolean - non_public: boolean - starred: boolean - sort: string - visibility_level: int - tags: string[] - personal: boolean - search: string - non_archived: boolean GroupProjectsFinder now inherits from ProjectsFinder. Changed the code in order to use the new available options.
2017-03-15Allow filtering by all started milestonesSean McGivern
2017-03-06Improve issues filtering performanceJarka Kadlecova
2017-02-23Enable Style/MutableConstantDouwe Maan
2017-02-17add a :iids param to IssuableFindermhasbini
2017-01-11Add comments to issuable finderClement Ho
2017-01-10Make sure we could query against no oneLin Jen-Shin
We should separate the idea of not finding anyone, and the idea of against no one.
2017-01-10Show no issues if author/assignee cannot be foundLin Jen-Shin
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7345/diffs#note_19994225
2017-01-10Check if it's not NONE tooLin Jen-Shin
So that we don't have to check it again in somewhere else, and we don't really need to know if it's presented as NONE Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7345/diffs#note_20123999
2017-01-10Add author_username and assignee_usernameClement Ho
2016-12-09Merge branch 'jej-23867-use-mr-finder-instead-of-access-check' into 'security'Douwe Maan
Replace MR access checks with use of MergeRequestsFinder Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867 :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 - [x] :bomb: app/finders/notes_finder.rb:17 - [x] :warning: app/views/layouts/nav/_project.html.haml:80 [`.count`] - [x] :bomb: app/controllers/concerns/creates_commit.rb:84 - [x] :traffic_light: app/controllers/projects/commits_controller.rb:24 - [x] :traffic_light: app/controllers/projects/compare_controller.rb:56 - [x] :vertical_traffic_light: app/controllers/projects/discussions_controller.rb:29 - [x] :white_check_mark: app/controllers/projects/todos_controller.rb:27 - [x] :vertical_traffic_light: app/models/commit.rb:268 - [x] :white_check_mark: 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-06Merge branch '24733-archived-project-merge-request-count' into 'master' Sean McGivern
Fix Archived project merge requests add to group's Merge Requests Closes #24733 See merge request !7790
2016-12-06Merge branch 'issue_25064' into 'security' Douwe Maan
Ensure state param has a valid value when filtering issuables. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/25064 This fix makes sure we only call safe methods on issuable when filtering by state. See merge request !2038
2016-12-05Fix Archived project merge requests add to group's Merge RequestsJacopo
counter This is done by: - Extending the IssuableFinder adding the non_archived option to the params - Overriding the #filter_params in the MergeRequestsAction - Passing the non_archived param in the nav/_group.html.haml navbar partial from the groups/merge_requests.html.haml
2016-12-01Count all issuable states at onceSean McGivern
Instead of doing n queries for n states, do one query to get all the counts grouped by state, and figure out what the count is for each state is from that. We can still cache the individual counts (it can't hurt), but this will help with initial load. Note that the `opened` scope on `Issuable` includes the `opened` and `reopened` states, which is why there's a special case.
2016-11-29Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security' Douwe Maan
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
2016-11-29Merge branch 'jej-fix-missing-access-check-on-issues' into 'security'Douwe Maan
Fix missing access checks on issue lookup using IssuableFinder Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867 :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 - [x] :white_check_mark: app/controllers/projects/branches_controller.rb:39 - `before_action :authorize_push_code!` helpes limit/prevent exploitation. Always checks for reporter access so fine with confidential issues, issues only visible to team, etc. - [x] :traffic_light: app/models/cycle_analytics/summary.rb:9 [`.count`] - [x] :white_check_mark: app/controllers/projects/todos_controller.rb:19 - [x] Potential double render in app/controllers/projects/todos_controller.rb - https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#cedccb227af9bfdf88802767cb58d43c2b977439_24_24 See merge request !2030
2016-11-26Remove unnecessary require_relative calls from finderSemyon Pupkov
2016-11-09Merge branch '22481-honour-issue-visibility-for-groups' into 'security' Douwe Maan
Honour issue and merge request visibility in their respective finders This MR fixes a security issue with the IssuesFinder and MergeRequestFinder where they would return items the user did not have permission to see. This was most visible on the issue and merge requests page for a group containing projects that had set their issues or merge requests to "private". Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/22481 See merge request !2000
2016-11-01Skip authorization check when searching for labels on IssuableFinderDouglas Barbosa Alexandre
2016-10-19Return only labels that user have access on IssuableFinder#labelsDouglas Barbosa Alexandre
2016-10-19Reuse LabelsFinder on Banzai::Filter::LabelReferenceFilterDouglas Barbosa Alexandre
2016-10-19Add ProjectLabel modelDouglas Barbosa Alexandre
2016-10-19Allow users to apply group labels on Issues/MRsDouglas Barbosa Alexandre
2016-09-30Take filters in account in issuable countersRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-20fix issues mr counterbarthc
2016-08-30remove Ability.abilitieshttp://jneen.net/
2016-08-01State specific default sort order for issuableszs
Provide more sensible default sort order for issues and merge requests based on the following table: | type | state | default sort order | |----------------|--------|--------------------| | issues | open | last created | | issues | closed | last updated | | issues | all | last created | | merge requests | open | last created | | merge requests | merged | last updated | | merge requests | closed | last updated | | merge requests | all | last created |
2016-06-06Improve Issuable.order_labels_priorityRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-06Sort by label priorityThijs Wouters
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-31Fix error 500 when sorting issues by milestone due date and filtering by labelsFelipe Artur