GitLab Bot
3b1af5cc7e
Add latest changes from gitlab-org/gitlab@16-1-stable-ee
2023-06-20 10:43:29 +00:00
GitLab Bot
71786ddc8e
Add latest changes from gitlab-org/gitlab@15-9-stable-ee
2023-02-20 13:49:51 +00:00
GitLab Bot
05f0ebba3a
Add latest changes from gitlab-org/gitlab@15-8-stable-ee
2023-01-18 19:00:14 +00:00
GitLab Bot
ee664acb35
Add latest changes from gitlab-org/gitlab@15-5-stable-ee
2022-10-20 09:40:42 +00:00
GitLab Bot
b39512ed75
Add latest changes from gitlab-org/gitlab@15-3-stable-ee
2022-08-18 08:17:02 +00:00
GitLab Bot
62e0c3c7d7
Add latest changes from gitlab-org/security/gitlab@15-2-stable-ee
2022-07-27 19:06:32 +00:00
GitLab Bot
0ea3fcec39
Add latest changes from gitlab-org/gitlab@15-1-stable-ee
2022-06-20 11:10:13 +00:00
GitLab Bot
36a59d088e
Add latest changes from gitlab-org/gitlab@15-0-stable-ee
2022-05-19 07:33:21 +00:00
GitLab Bot
3cccd102ba
Add latest changes from gitlab-org/gitlab@14-10-stable-ee
2022-04-20 10:00:54 +00:00
GitLab Bot
41fe97390c
Add latest changes from gitlab-org/gitlab@14-9-stable-ee
2022-03-18 20:02:30 +00:00
GitLab Bot
edaa33dee2
Add latest changes from gitlab-org/gitlab@14-7-stable-ee
2022-01-20 09:16:11 +00:00
GitLab Bot
aee0a117a8
Add latest changes from gitlab-org/gitlab@14-6-stable-ee
2021-12-20 13:37:47 +00:00
GitLab Bot
311b0269b4
Add latest changes from gitlab-org/gitlab@14-5-stable-ee
2021-11-18 13:16:36 +00:00
GitLab Bot
4555e1b21c
Add latest changes from gitlab-org/gitlab@13-12-stable-ee
2021-05-19 15:44:42 +00:00
GitLab Bot
859a6fb938
Add latest changes from gitlab-org/gitlab@13-9-stable-ee
2021-02-18 10:34:06 +00:00
GitLab Bot
7e9c479f7d
Add latest changes from gitlab-org/gitlab@13-6-stable-ee
2020-11-19 08:27:35 +00:00
GitLab Bot
48aff82709
Add latest changes from gitlab-org/gitlab@13-5-stable-ee
2020-10-21 07:08:36 +00:00
GitLab Bot
a09983ae35
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
2020-07-20 12:26:25 +00:00
GitLab Bot
b7d58ff8b1
Add latest changes from gitlab-org/gitlab@master
2019-12-14 00:08:27 +00:00
GitLab Bot
7ddd584699
Add latest changes from gitlab-org/gitlab@master
2019-11-30 00:06:03 +00:00
GitLab Bot
b7dfe2ae40
Add latest changes from gitlab-org/gitlab@master
2019-09-13 13:26:31 +00:00
Luke Duncalfe
330cbddec3
Renaming AwardedEmojiFinder to a Service
...
This finder class acts more as a service, as it only returns mapped
data.
Renaming this class allows us to create a new AwardEmojiFinder without
the ambiguity of there being two similarly-named finders.
https://gitlab.com/gitlab-org/gitlab-ce/issues/63372
2019-08-21 10:00:00 +12:00
Igor
f74b33cf6e
Add can_merge option to autocomplete response
...
It's used only if merge_request_iid param is provided
2019-08-01 16:51:14 +00:00
Hiroyuki Sato
de784ac105
Filter merge requests by target branch
2019-03-09 12:22:58 +00:00
William George
1b153d497b
Make getting a user by the username case insensitive
2018-10-18 09:06:44 +00:00
gfyoung
73322a0e55
Enable frozen string in app/controllers/**/*.rb
...
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 .
2018-09-18 21:22:45 -07:00
Yorick Peterse
6f3c490107
Refactor AutocompleteController
...
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".
2018-08-20 13:53:00 +02:00
Robert Speicher
2f92238a6e
Use UserSerializer instead of `User.to_json`
2017-12-19 15:45:08 -06:00
Jacopo
181cd299f9
Adds Rubocop rule for line break after guard clause
...
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
2017-11-16 17:58:29 +01:00
Maxim Rydkin
fa276e3029
move `find_users` method into finder and add `load_group` method
2017-09-10 18:31:06 +03:00
Maxim Rydkin
20ff87a261
rename yet_another_users_finder into autocomplete_users_finder
2017-09-10 18:31:06 +03:00
Maxim Rydkin
fbbb985a03
extract finder and add first test
2017-09-10 18:31:05 +03:00
Eric Eastwood
90c60138db
Move "Move to different project" to sidebar
...
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/34261
2017-09-03 22:03:17 -05:00
Sean McGivern
07a7801c03
Fix MySQL failure for emoji autocomplete
...
Postgres lets you treat `count` as another alias for `COUNT(*)` apparently, even
if that's not the actual alias used.
2017-08-30 11:30:12 +01:00
Hiroyuki Sato
7187395ef1
Add filter by my reaction
2017-08-30 07:48:55 +00:00
Tiago Botelho
574b3efd6b
Fixes the user order being overriden in the autocomplete controller
2017-07-14 16:31:45 +01:00
DJ Mountney
982368dc55
Merge branch 'dz-restrict-autocomplete' into 'security-9-1'
...
Allow users autocomplete by author_id only for authenticated users
See merge request !2100
2017-06-08 09:52:27 -07:00
Clement Ho
2339bef1bc
Add per page to user autocomplete
2017-05-26 12:59:00 -05:00
Rémy Coutable
d40e1f547e
Enable the Style/TrailingCommaInLiteral cop
...
Use the EnforcedStyleForMultiline: no_comma option.
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Sean McGivern
5c0f6c856d
Fix autocomplete in EE when permissions are sent
...
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.
2017-03-10 11:41:44 +00:00
Sean McGivern
2c40a012d6
Don't call `#uniq` on a relation
...
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).
2017-01-27 15:28:17 +00:00
Phil Hughes
92682b8ae1
Shows current user on top of filtered dropdown list
2017-01-17 10:22:48 -05:00
Semyon Pupkov
f5e8337c7b
Do not raise error in AutocompleteController#users when not authorized
...
https://gitlab.com/gitlab-org/gitlab-ce/issues/25031
2016-11-30 10:09:14 +05:00
Phil Hughes
17ac0fd53d
Improved Ruby code in autocomplete user search
2016-11-18 16:10:48 +00:00
Phil Hughes
80073da957
Include author in assignee dropdown search
...
When searching for the author in the assignee dropdown it now correctly returns the user
Closes #22905
2016-11-17 11:13:39 +00:00
Valery Sizov
b7dff1b072
Fix: Todos Filter Shows All Users
2016-11-04 13:41:14 +02:00
Paco Guzman
03386633a4
Move to project dropdown with infinite scroll for better performance
...
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
2016-08-17 07:33:51 +02:00
Timothy Andrew
f898a47e14
Fix a missed `before_action` for `AutocompleteController`.
...
- `#find_users` depends on a project being loaded.
- Missed adding this in 2193ae222b
2016-08-16 15:29:10 +05:30
Timothy Andrew
2193ae222b
Backport `AutocompleteController#load_project` from EE!581.
...
- This is an optimization that was made in !581 , and it needs to be
backported to CE to avoid merge conflicts in the future.
2016-08-16 15:16:08 +05:30
Sean McGivern
dc4de2d8e2
Allow skipping users in autocomplete
...
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).
2016-07-27 14:10:49 +01:00