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
2019-08-12Load search result counts asynchronouslyMarkus Koller
Querying all counts for the different search results in the same request led to timeouts, so we now only calculate the count for the *current* search results, and request the others in separate asynchronous calls.
2019-08-08Backport EE changes to ProjectSearchResultsYorick Peterse
EE made some changes to the project_ids_relation method, but these were not backported to CE.
2019-08-01Use NotesFinder in IssuableActions modulePatrick Derichs
Remove project from NotesFinder constructor Add project parameter to specs Also look for methods in private scope Fix specs to match new NotesFinder constructor
2019-05-20Resolve: Milestones leaked via search APIFelipe Artur
Fix milestone titles being leaked using search API when users cannot read milestones
2019-05-07Add improvements to the global search processFrancisco Javier López
Removed the conditions added to Project.with_feature_available_for_user, and moved to the IssuableFinder. Now, we ensure that, in the projects retrieved in the Finder, the user has enough access for the feature.
2019-03-14project's user search includes group members tooAlexis Reigel
2019-03-14add users search results to project scoped searchAlexis Reigel
2018-12-06Optimized file search to work without limitsJan Provaznik
* removed 100 limit on file search results because we load all results anyway * expensive processing (parsing match content, utf encoding) is done only for selected page in paginated output
2018-10-30Allow FoundBlob to access language from gitattributesMark Chao
Extract language_from_git_attributes as a concern so it can ben included in two blob classes.
2018-10-22Enable frozen string for lib/gitlab/*.rbgfyoung
2018-09-11Disable existing offenses for the CodeReuse copsYorick Peterse
This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop.
2018-07-20Fixing bug with wiki ref in ProjectSearchResultsFrancisco Javier López
2018-06-04Add ability to search wiki titlesFrancisco Javier López
2018-05-15Disable greedy mode when matching filenameJan Provaznik
2018-03-19Split repository search result on \n instead of $ to prevent the items of ↵Jasper Maes
the array to start with a newline. Remove the strip from parsing the search result to keep result endlines.
2018-03-05Use limited count queries also for scoped searchesJan Provaznik
2018-02-14API - Include project in commits&blobs search resultsJarka Kadlecová
2018-02-06Return only limited pagination headers for search API endpointsJarka Kadlecová
2018-02-06Support search in APIJarka Kadlecová
2018-01-24Use limit for search count queriesJan Provaznik
Search query is especially slow if a user searches a generic string which matches many records, in such case search can take tens of seconds or time out. To speed up the search query, we search only for first 1000 records, if there is >1000 matching records we just display "1000+" instead of precise total count supposing that with such amount the exact count is not so important for the user. Because for issues even limited search was not fast enough, 2-phase approach is used for issues: first we use simpler/faster query to get all public issues, if this exceeds the limit, we just return the limit. If the amount of matching results is lower than limit, we re-run more complex search query (which includes also confidential issues). Re-running the complex query should be fast enough in such case because the amount of matching issues is lower than limit. Because exact total_count is now limited, this patch also switches to to "prev/next" pagination. Related #40540
2018-01-16Fix project search results for digits surrounded by colonsSean McGivern
A file containing /:\d+:/ in its contents would break the search results if those contents were part of the results, because we were splitting on colons, which can't work with untrusted input. Changing to use the null byte as a separator is much safer.
2017-11-30fix for special charecter in file nameshaseeb
2017-05-12Backport FileFinder from EEValery Sizov
2017-05-10Merge branch '31157-respect-project-features-in-wiki-search' into 'security' Douwe Maan
Respect project features in wiki and blob search See merge request !2089
2017-04-03Fix blob highlighting in searchNick Thomas
2017-01-24Search feature: redirects to commit page if query is commit sha and only ↵YarNayar
commit found See !8028 and #24833
2017-01-24Allows to search within project by commit's hashYarNayar
Was proposed in #24833
2016-12-15Merge branch 'jej-note-search-uses-finder' into 'security' Douwe Maan
Fix missing Note access checks in by moving Note#search to updated NoteFinder 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 ### Note lookup without access check - [x] :white_check_mark: app/finders/notes_finder.rb:13 :download_code check - [x] :white_check_mark: app/finders/notes_finder.rb:19 `SnippetsFinder` - [x] :white_check_mark: app/models/note.rb:121 [`Issue#visible_to_user`] - [x] :white_check_mark: lib/gitlab/project_search_results.rb:113 - This is the only use of `app/models/note.rb:121` above, but importantly has no access checks at all. This means it leaks MR comments and snippets when those features are `team-only` in addition to the issue comments which would be fixed by `app/models/note.rb:121`. - It is only called from SearchController where `can?(current_user, :download_code, @project)` is checked, so commit comments are not leaked. ### Previous discussions - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b915c5267a63628b0bafd23d37792ae73ceae272_13_13 `: download_code` check on commit - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b915c5267a63628b0bafd23d37792ae73ceae272_19_19 `SnippetsFinder` should be used - `SnippetsFinder` should check if the snippets feature is enabled -> https://gitlab.com/gitlab-org/gitlab-ce/issues/25223 ### Acceptance criteria met? - [x] Tests added for new code - [x] TODO comments removed - [x] Squashed and removed skipped tests - [x] Changelog entry - [ ] State Gitlab versions affected and issue severity in description - [ ] Create technical debt issue for NotesFinder. - Either split into `NotesFinder::ForTarget` and `NotesFinder::Search` or consider object per notable type such as `NotesFinder::OnIssue`. For the first option could create `NotesFinder::Base` which is either inherited from or which can be included in the other two. - Avoid case statement anti-pattern in this finder with use of `NotesFinder::OnCommit` etc. Consider something on the finder for this? `Model.finder(user, project)` - Move `inc_author` to the controller, and implement `related_notes` to replace `non_diff_notes`/`mr_and_commit_notes` See merge request !2035
2016-11-16Search for a filename in a projectValery Sizov
2016-11-08Faster searchValery Sizov
2016-10-20Refactoring find_commits functionalityValery Sizov
2016-09-06Clean up search result classesValery Sizov
2016-05-31Confidential notes data leakValery Sizov
2016-03-18Restrict access to confidential issues on search resultsDouglas Barbosa Alexandre
2016-03-11Added ProjectSearchResults#project_ids_relationYorick Peterse
This ensures some other methods such as the "issues" method still work.
2016-03-11Refactor Gitlab::ProjectSearchResultsYorick Peterse
Previously this class would be given a project ID which was then used to retrieve the corresponding Project object. However, in all cases the Project object was already known as it was used to grab the ID to pass to ProjectSearchResults. By just passing a Project instead we remove the need for an extra query as well as the need for some other complexity in this class.
2015-11-03Fix commits search for empty repositoryDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-02Refactor search by commits messageDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-29Trying to incorporate suggestions from comments on Merge Request 1661Michael Chmielewski
2015-10-29Add support for searching commit log messagesJonathan Schoeffling
Include the log messages of recent commits in project-level search results, providing functionality similar to 'git log --grep'. Update repository model rspec tests to validate the output of Repository#commits_with_log_matching.
2015-10-21Fix issue #3055 (project search with unmatched parentheses)Dirceu Pereira Tiegs
2015-06-09Revert "No need to check if `repository_ref` is present"Jeroen van Baarsen
2015-06-08No need to check if `repository_ref` is presentzenati
There is no need to check if `repository_ref` is present as: ``` @repository_ref = if repository_ref.present? repository_ref else nil end ``` is as same as doing: ``` @repository_ref = repository_ref ```
2015-03-23Don't include system notes in issue/MR comment count.Douwe Maan
2014-09-25Fix 500 error on empty search in projectDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-25Fix wikiDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-09Prevent 500 error when search wiki for non-existing repoDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-06Fixed trailing white spaceRalf Seidler
2014-09-06Fixed houndci complaining over too long linesRalf Seidler
2014-09-05Added search wiki featureRalf Seidler