summaryrefslogtreecommitdiff
path: root/app/controllers/autocomplete_controller.rb
Commit message (Collapse)AuthorAgeFilesLines
* Filter merge requests by target branchHiroyuki Sato2019-03-091-1/+8
|
* Make getting a user by the username case insensitiveWilliam George2018-10-181-1/+1
|
* Enable frozen string in app/controllers/**/*.rbrepo-forks/gitlab-ce-frozen-string-app-controllergfyoung2018-09-181-0/+2
| | | | | | | | | | | | Enables frozen string for the following: * app/controllers/*.rb * app/controllers/admin/**/*.rb * app/controllers/boards/**/*.rb * app/controllers/ci/**/*.rb * app/controllers/concerns/**/*.rb Partially addresses #47424.
* Refactor AutocompleteControllerdefine-abstraction-levelsYorick Peterse2018-08-201-50/+22
| | | | | | | | | | | | | | | | | | | | | | | This refactors the AutocompleteController according to the guidelines and boundaries discussed in https://gitlab.com/gitlab-org/gitlab-ce/issues/49653. Specifically, ActiveRecord logic is moved to different finders, which are then used in the controller. View logic in turn is moved to presenters, instead of directly using ActiveRecord's "to_json" method. The finder MoveToProjectFinder is also adjusted according to the abstraction guidelines and boundaries, resulting in a much more simple finder. By using finders (and other abstractions) more actively, we can push a lot of logic out of the controller. We also remove the need for various "before_action" hooks, though this could be achieved without using finders as well. The various finders related to AutcompleteController have also been moved into a namespace. This removes the need for calling everything "AutocompleteSmurfFinder", instead you can use "Autocomplete::SmurfFinder".
* Use UserSerializer instead of `User.to_json`Robert Speicher2017-12-191-2/+2
|
* Adds Rubocop rule for line break after guard clauseJacopo2017-11-161-0/+2
| | | | Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
* move `find_users` method into finder and add `load_group` methodMaxim Rydkin2017-09-101-19/+7
|
* rename yet_another_users_finder into autocomplete_users_finderMaxim Rydkin2017-09-101-1/+1
|
* extract finder and add first testMaxim Rydkin2017-09-101-22/+1
|
* Move "Move to different project" to sidebar34261-move-move-to-sidebarEric Eastwood2017-09-031-6/+0
| | | | Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/34261
* Fix MySQL failure for emoji autocompleteSean McGivern2017-08-301-1/+1
| | | | | Postgres lets you treat `count` as another alias for `COUNT(*)` apparently, even if that's not the actual alias used.
* Add filter by my reactionHiroyuki Sato2017-08-301-1/+17
|
* Fixes the user order being overriden in the autocomplete controllerfix-exact-matches-of-username-and-email-on-top-of-the-user-searchTiago Botelho2017-07-141-2/+2
|
* Merge branch 'dz-restrict-autocomplete' into 'security-9-1'DJ Mountney2017-06-081-1/+1
| | | | | | Allow users autocomplete by author_id only for authenticated users See merge request !2100
* Add per page to user autocomplete32977-user-autocomplete-per_page-does-not-workClement Ho2017-05-261-1/+1
|
* Enable the Style/TrailingCommaInLiteral copRémy Coutable2017-05-101-1/+1
| | | | | | Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix autocomplete in EE when permissions are sent29316-can-t-select-a-mirror-userSean McGivern2017-03-101-2/+1
| | | | | | | | | | In EE, `@users` can be an array at the point where we remove the current user, because it can do a permissions check on the users for project mirroring. Fix this in CE by only using array methods, not AR methods. We can't use `delete` because that uses `Object#equal?`, which isn't true in this case.
* Don't call `#uniq` on a relationSean McGivern2017-01-271-3/+2
| | | | | | | | | When there was no project, no search, and no current user or author param, the AutocompleteController would call `#uniq!` on a relation instead of an array. This performed the less-efficient `SELECT DISTINCT` when it wasn't even needed (because the query wouldn't return duplicates anyway - duplicates were only added by putting a user on top of the list).
* Shows current user on top of filtered dropdown listcurrent-user-filter-topPhil Hughes2017-01-171-1/+1
|
* Do not raise error in AutocompleteController#users when not authorizedSemyon Pupkov2016-11-301-1/+1
| | | | https://gitlab.com/gitlab-org/gitlab-ce/issues/25031
* Improved Ruby code in autocomplete user searchPhil Hughes2016-11-181-1/+1
|
* Include author in assignee dropdown searchassignee-dropdown-autocompletePhil Hughes2016-11-171-1/+7
| | | | | | When searching for the author in the assignee dropdown it now correctly returns the user Closes #22905
* Fix: Todos Filter Shows All Users22588-todos-filter-shows-all-usersValery Sizov2016-11-041-1/+5
|
* Move to project dropdown with infinite scroll for better performance17932-move-to-project-dropdown-improvePaco Guzman2016-08-171-8/+6
| | | | | | | | Use just SQL to check is a user can admin_issue on a project Tradeoff - we duplicate how we check admin_issue in a SQL relation in the Ability class
* Fix a missed `before_action` for `AutocompleteController`.Timothy Andrew2016-08-161-0/+1
| | | | | | - `#find_users` depends on a project being loaded. - Missed adding this in 2193ae222b3337f03c18dd7d27408a1b138c2f92
* Backport `AutocompleteController#load_project` from EE!581.Timothy Andrew2016-08-161-5/+12
| | | | | - This is an optimization that was made in !581, and it needs to be backported to CE to avoid merge conflicts in the future.
* Allow skipping users in autocompleteallow-skipping-users-in-autocompleteSean McGivern2016-07-271-0/+1
| | | | | | Pass an array of user IDs in the `skip_users` param to have them excluded from the results (unless they are explicitly included through the `current_user` or `author_id` params).
* Fixed issue with move dropdown not being searchableproject-move-dropdown-searchPhil Hughes2016-06-151-0/+1
| | | | Closes #18634
* Updated Rubymove-project-dropdown-asyncPhil Hughes2016-05-251-2/+5
|
* Correctly sends project IDPhil Hughes2016-05-201-1/+1
|
* Loads move issue dropdown asyncPhil Hughes2016-05-161-0/+15
| | | | Closes #16563
* Merge branch 'master' into assign-to-issuable-openerZeger-Jan van de Weg2016-04-151-2/+3
|\
* \ Merge branch 'master' into assign-to-issuable-openerZeger-Jan van de Weg2016-03-291-1/+1
|\ \ | |/
| * Use the configured Kaminari "per page" defaultrs-use-kaminari-defaultRobert Speicher2016-03-191-1/+1
| |
* | Revert authors ability to assign anyoneZeger-Jan van de Weg2016-02-221-1/+1
| |
* | Fix loading data when no author_id is passedZeger-Jan van de Weg2016-02-221-1/+1
| |
* | Issuable can be assigned to authorZeger-Jan van de Weg2016-02-221-1/+7
|/ | | | | | | Closes #9014 The only difference with #9014 is that I thoughed the author should also be able to assign the issue. If this is unwanted behavior Ill revert it.
* Update autocomplete_controller to be more readableFelipe Orlando2015-11-221-1/+1
|
* Reduce method complexity in AutocompleteControlleree-flogDouwe Maan2015-11-201-27/+22
|
* Sorted autocomplete users list by nameAllister Antosik2015-09-151-0/+1
|
* Fix bug preventing invite by e-mailStan Hu2015-08-211-2/+8
| | | | | | This was broken in 70f5291808 as a result of introducing the ability to filter by current user. Closes #2320
* Always add current user to autocomplete controller to support filter by "Me"Stan Hu2015-08-061-0/+2
| | | | Partial fix #2202
* Better handle unknown projects and groups for autocompleteStan Hu2015-07-111-14/+23
|
* Fix user autocomplete for unauthenticated users accessing public projectsStan Hu2015-07-101-1/+5
| | | | Closes #1955
* Add autocomplete controllerDmitriy Zaporozhets2015-03-261-0/+30