Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
55f044ae
Commit
55f044ae
authored
Aug 21, 2018
by
Yorick Peterse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed autocomplete related conflicts
parent
68c1a217
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
32 deletions
+0
-32
app/controllers/autocomplete_controller.rb
app/controllers/autocomplete_controller.rb
+0
-14
app/finders/autocomplete/users_finder.rb
app/finders/autocomplete/users_finder.rb
+0
-3
app/models/user.rb
app/models/user.rb
+0
-6
spec/models/user_spec.rb
spec/models/user_spec.rb
+0
-9
No files found.
app/controllers/autocomplete_controller.rb
View file @
55f044ae
class
AutocompleteController
<
ApplicationController
class
AutocompleteController
<
ApplicationController
<<<<<<<
HEAD
prepend
EE
::
AutocompleteController
prepend
EE
::
AutocompleteController
=======
>>>>>>>
upstream
/
master
skip_before_action
:authenticate_user!
,
only:
[
:users
,
:award_emojis
]
skip_before_action
:authenticate_user!
,
only:
[
:users
,
:award_emojis
]
def
users
def
users
...
@@ -14,7 +11,6 @@ class AutocompleteController < ApplicationController
...
@@ -14,7 +11,6 @@ class AutocompleteController < ApplicationController
group
=
Autocomplete
::
GroupFinder
group
=
Autocomplete
::
GroupFinder
.
new
(
current_user
,
project
,
params
)
.
new
(
current_user
,
project
,
params
)
.
execute
.
execute
<<<<<<<
HEAD
users
=
Autocomplete
::
UsersFinder
users
=
Autocomplete
::
UsersFinder
.
new
(
params:
params
,
current_user:
current_user
,
project:
project
,
group:
group
)
.
new
(
params:
params
,
current_user:
current_user
,
project:
project
,
group:
group
)
...
@@ -23,16 +19,6 @@ class AutocompleteController < ApplicationController
...
@@ -23,16 +19,6 @@ class AutocompleteController < ApplicationController
render
json:
UserSerializer
.
new
.
represent
(
users
)
render
json:
UserSerializer
.
new
.
represent
(
users
)
end
end
=======
users
=
Autocomplete
::
UsersFinder
.
new
(
params:
params
,
current_user:
current_user
,
project:
project
,
group:
group
)
.
execute
render
json:
UserSerializer
.
new
.
represent
(
users
)
end
>>>>>>>
upstream
/
master
def
user
def
user
user
=
UserFinder
.
new
(
params
).
execute!
user
=
UserFinder
.
new
(
params
).
execute!
...
...
app/finders/autocomplete/users_finder.rb
View file @
55f044ae
...
@@ -2,11 +2,8 @@
...
@@ -2,11 +2,8 @@
module
Autocomplete
module
Autocomplete
class
UsersFinder
class
UsersFinder
<<<<<<<
HEAD
prepend
EE
::
Autocomplete
::
UsersFinder
prepend
EE
::
Autocomplete
::
UsersFinder
=======
>>>>>>>
upstream
/
master
# The number of users to display in the results is hardcoded to 20, and
# The number of users to display in the results is hardcoded to 20, and
# pagination is not supported. This ensures that performance remains
# pagination is not supported. This ensures that performance remains
# consistent and removes the need for implementing keyset pagination to
# consistent and removes the need for implementing keyset pagination to
...
...
app/models/user.rb
View file @
55f044ae
...
@@ -20,11 +20,8 @@ class User < ActiveRecord::Base
...
@@ -20,11 +20,8 @@ class User < ActiveRecord::Base
include
BlocksJsonSerialization
include
BlocksJsonSerialization
include
WithUploads
include
WithUploads
include
OptionallySearch
include
OptionallySearch
<<<<<<<
HEAD
prepend
EE
::
User
prepend
EE
::
User
=======
>>>>>>>
upstream
/
master
DEFAULT_NOTIFICATION_LEVEL
=
:participating
DEFAULT_NOTIFICATION_LEVEL
=
:participating
...
@@ -261,14 +258,11 @@ class User < ActiveRecord::Base
...
@@ -261,14 +258,11 @@ class User < ActiveRecord::Base
scope
:external
,
->
{
where
(
external:
true
)
}
scope
:external
,
->
{
where
(
external:
true
)
}
scope
:active
,
->
{
with_state
(
:active
).
non_internal
}
scope
:active
,
->
{
with_state
(
:active
).
non_internal
}
scope
:without_projects
,
->
{
joins
(
'LEFT JOIN project_authorizations ON users.id = project_authorizations.user_id'
).
where
(
project_authorizations:
{
user_id:
nil
})
}
scope
:without_projects
,
->
{
joins
(
'LEFT JOIN project_authorizations ON users.id = project_authorizations.user_id'
).
where
(
project_authorizations:
{
user_id:
nil
})
}
<<<<<<<
HEAD
scope
:subscribed_for_admin_email
,
->
{
where
(
admin_email_unsubscribed_at:
nil
)
}
scope
:subscribed_for_admin_email
,
->
{
where
(
admin_email_unsubscribed_at:
nil
)
}
scope
:ldap
,
->
{
joins
(
:identities
).
where
(
'identities.provider LIKE ?'
,
'ldap%'
)
}
scope
:ldap
,
->
{
joins
(
:identities
).
where
(
'identities.provider LIKE ?'
,
'ldap%'
)
}
scope
:with_provider
,
->
(
provider
)
do
scope
:with_provider
,
->
(
provider
)
do
joins
(
:identities
).
where
(
identities:
{
provider:
provider
})
joins
(
:identities
).
where
(
identities:
{
provider:
provider
})
end
end
=======
>>>>>>>
upstream
/
master
scope
:order_recent_sign_in
,
->
{
reorder
(
Gitlab
::
Database
.
nulls_last_order
(
'current_sign_in_at'
,
'DESC'
))
}
scope
:order_recent_sign_in
,
->
{
reorder
(
Gitlab
::
Database
.
nulls_last_order
(
'current_sign_in_at'
,
'DESC'
))
}
scope
:order_oldest_sign_in
,
->
{
reorder
(
Gitlab
::
Database
.
nulls_last_order
(
'current_sign_in_at'
,
'ASC'
))
}
scope
:order_oldest_sign_in
,
->
{
reorder
(
Gitlab
::
Database
.
nulls_last_order
(
'current_sign_in_at'
,
'ASC'
))
}
scope
:confirmed
,
->
{
where
.
not
(
confirmed_at:
nil
)
}
scope
:confirmed
,
->
{
where
.
not
(
confirmed_at:
nil
)
}
...
...
spec/models/user_spec.rb
View file @
55f044ae
...
@@ -378,21 +378,12 @@ describe User do
...
@@ -378,21 +378,12 @@ describe User do
context
'when filtering by todo authors'
do
context
'when filtering by todo authors'
do
let
(
:user1
)
{
create
(
:user
)
}
let
(
:user1
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
<<<<<<<
HEAD
before
do
before
do
create
(
:todo
,
user:
user1
,
author:
user1
,
state: :done
)
create
(
:todo
,
user:
user1
,
author:
user1
,
state: :done
)
create
(
:todo
,
user:
user2
,
author:
user2
,
state: :pending
)
create
(
:todo
,
user:
user2
,
author:
user2
,
state: :pending
)
end
end
=======
before
do
create
(
:todo
,
user:
user1
,
author:
user1
,
state: :done
)
create
(
:todo
,
user:
user2
,
author:
user2
,
state: :pending
)
end
>>>>>>>
upstream
/
master
it
'only returns users that have authored todos'
do
it
'only returns users that have authored todos'
do
users
=
described_class
.
limit_to_todo_authors
(
users
=
described_class
.
limit_to_todo_authors
(
user:
user2
,
user:
user2
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment