Commit Graph

30 Commits

Author SHA1 Message Date
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
Phil Hughes e412c1f25e Fixed issue with move dropdown not being searchable
Closes #18634
2016-06-15 08:53:11 +01:00
Phil Hughes 50a16c4bd7 Updated Ruby 2016-05-25 15:26:02 +01:00
Phil Hughes 672bd4e6ff Correctly sends project ID 2016-05-20 21:52:45 +01:00
Phil Hughes 5c4416bb45 Loads move issue dropdown async
Closes #16563
2016-05-16 15:24:51 +01:00
Zeger-Jan van de Weg 33f8b06c39 Merge branch 'master' into assign-to-issuable-opener 2016-04-15 14:38:15 +02:00
Zeger-Jan van de Weg 3339513ca6 Merge branch 'master' into assign-to-issuable-opener 2016-03-29 17:26:59 +02:00
Robert Speicher 085538c2bd Use the configured Kaminari "per page" default 2016-03-19 17:37:54 -04:00
Zeger-Jan van de Weg 15a6633999 Revert authors ability to assign anyone 2016-02-22 12:50:25 +01:00
Zeger-Jan van de Weg 829830ae9d Fix loading data when no author_id is passed 2016-02-22 12:10:56 +01:00
Zeger-Jan van de Weg df27b3a174 Issuable can be assigned to author
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.
2016-02-22 12:10:56 +01:00
Felipe Orlando 075e3661c5 Update autocomplete_controller to be more readable 2015-11-22 06:04:20 -02:00
Douwe Maan 5a4c56c38d Reduce method complexity in AutocompleteController 2015-11-20 13:49:24 +01:00
Allister Antosik c9389d0e74 Sorted autocomplete users list by name 2015-09-15 22:48:24 +01:00
Stan Hu 3715a0f29b Fix bug preventing invite by e-mail
This was broken in 70f5291808 as a result of introducing the ability to filter by current user.

Closes #2320
2015-08-21 13:47:56 -07:00
Stan Hu 70f5291808 Always add current user to autocomplete controller to support filter by "Me"
Partial fix #2202
2015-08-06 00:46:14 -07:00
Stan Hu 96644c1fc1 Better handle unknown projects and groups for autocomplete 2015-07-11 06:19:32 -07:00
Stan Hu 0b67d7a0fe Fix user autocomplete for unauthenticated users accessing public projects
Closes #1955
2015-07-10 17:39:58 -07:00
Dmitriy Zaporozhets 26053c8705 Add autocomplete controller 2015-03-26 19:06:19 -07:00