summaryrefslogtreecommitdiff
path: root/spec/controllers/search_controller_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@15-10-stable-eev15.10.0-rc42GitLab Bot2023-03-201-3/+10
|
* Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42GitLab Bot2023-02-201-2/+3
|
* Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42GitLab Bot2022-12-201-0/+6
|
* Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42GitLab Bot2022-11-171-1/+8
|
* Add latest changes from gitlab-org/security/gitlab@15-5-stable-eeGitLab Bot2022-11-011-1/+1
|
* Add latest changes from gitlab-org/gitlab@15-5-stable-eev15.5.0-rc42GitLab Bot2022-10-201-1/+1
|
* Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42GitLab Bot2022-09-191-0/+53
|
* Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42GitLab Bot2022-08-181-44/+23
|
* Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42GitLab Bot2022-07-201-15/+24
|
* Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42GitLab Bot2022-04-201-0/+1
|
* Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42GitLab Bot2022-03-181-5/+25
|
* Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42GitLab Bot2022-02-181-1/+2
|
* Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42GitLab Bot2022-01-201-1/+26
|
* Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42GitLab Bot2021-12-201-22/+87
|
* Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42GitLab Bot2021-10-201-1/+11
|
* Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42GitLab Bot2021-09-201-0/+31
|
* Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42GitLab Bot2021-08-191-0/+16
|
* Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42GitLab Bot2021-06-161-1/+1
|
* Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40GitLab Bot2021-03-161-13/+27
|
* Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42GitLab Bot2021-02-181-187/+205
|
* Add latest changes from gitlab-org/security/gitlab@13-6-stable-eeGitLab Bot2020-12-041-1/+1
|
* Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42GitLab Bot2020-11-191-1/+4
|
* Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42GitLab Bot2020-10-211-1/+1
|
* Add latest changes from gitlab-org/gitlab@13-4-stable-eeGitLab Bot2020-09-191-33/+74
|
* Add latest changes from gitlab-org/gitlab@13-3-stable-eeGitLab Bot2020-08-201-0/+19
|
* Add latest changes from gitlab-org/gitlab@13-2-stable-eeGitLab Bot2020-07-201-0/+5
|
* Add latest changes from gitlab-org/gitlab@13-1-stable-eeGitLab Bot2020-06-181-6/+1
|
* Add latest changes from gitlab-org/gitlab@13-0-stable-eeGitLab Bot2020-05-201-9/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-131-0/+8
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-271-6/+6
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-141-13/+7
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-12-261-0/+42
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-021-1/+1
|
* Load search result counts asynchronouslyMarkus Koller2019-08-121-90/+112
| | | | | | 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.
* Merge branch 'sh-avoid-loading-pipeline-status' into 'master'Nick Thomas2019-06-271-0/+13
|\ | | | | | | | | Avoid loading pipeline status in search results See merge request gitlab-org/gitlab-ce!30111
| * Avoid loading pipeline status in search resultsStan Hu2019-06-271-0/+13
| | | | | | | | | | | | | | This improves the performance of search, since the pipeline status is not displayed. Identified in https://gitlab.com/gitlab-org/gitlab-ce/issues/56627
* | Enable Gitaly ref caching for SearchControllersh-add-gitaly-ref-caching-search-controllerStan Hu2019-06-261-0/+4
|/ | | | | | | As we noticed in https://gitlab.com/gitlab-org/gitlab-ce/issues/56627#note_185828742, clicking on the "Issues" tab often requests the same reference in rendering Markdown.
* Use wiki partial in search resultsMario de la Ossa2019-04-251-0/+24
|
* Add some frozen string to spec/**/*.rbgfyoung2019-04-151-0/+2
| | | | | | | | | | Adds frozen string to the following: * spec/bin/**/*.rb * spec/config/**/*.rb * spec/controllers/**/*.rb xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
* Move Contribution Analytics related spec in ↵Imre Farkas2019-04-091-0/+39
| | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"Andreas Brandl2019-04-051-39/+0
| | | This reverts merge request !26823
* Move Contribution Analytics related spec in ↵Imre Farkas2019-04-051-0/+39
| | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* Enable the Layout/ExtraSpacing cop56392-enable-the-layout-extraspacing-copRémy Coutable2019-01-241-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Update specs to rails5 formatblackst0ne-convert-specs-rails5-styleblackst0ne2018-12-191-6/+6
| | | | | | | | | | Updates specs to use new rails5 format. The old format: `get :show, { some: params }, { some: headers }` The new format: `get :show, params: { some: params }, headers: { some: headers }`
* Render a 403 when showing an access denied messagebvl-403-for-external-auth-service-ceBob Van Landuyt2018-06-051-1/+1
| | | | | | | | When we want to show an access denied message to a user, we don't have to hide the resource's existence. So in that case we render a 403, this 403 is not handled by nginx on omnibus installs, making sure the message is visible to the user.
* Port `read_cross_project` ability from EEBob Van Landuyt2018-02-221-0/+26
|
* Change all `:empty_project` to `:project`rs-empty_project-defaultRobert Speicher2017-08-021-4/+4
|
* Correct RSpec/SingleLineHook cop offensesRobert Speicher2017-06-141-1/+3
|
* Add traits for ProjectFeatures to Project factorySemyon Pupkov2017-02-051-13/+3
| | | | https://gitlab.com/gitlab-org/gitlab-ce/issues/24007
* Merge branch 'jej-note-search-uses-finder' into 'security' Douwe Maan2016-12-151-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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