Commit 55f044ae authored by Yorick Peterse's avatar Yorick Peterse

Fixed autocomplete related conflicts

parent 68c1a217
class AutocompleteController < ApplicationController
<<<<<<< HEAD
prepend EE::AutocompleteController
=======
>>>>>>> upstream/master
skip_before_action :authenticate_user!, only: [:users, :award_emojis]
def users
......@@ -14,7 +11,6 @@ class AutocompleteController < ApplicationController
group = Autocomplete::GroupFinder
.new(current_user, project, params)
.execute
<<<<<<< HEAD
users = Autocomplete::UsersFinder
.new(params: params, current_user: current_user, project: project, group: group)
......@@ -23,16 +19,6 @@ class AutocompleteController < ApplicationController
render json: UserSerializer.new.represent(users)
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
user = UserFinder.new(params).execute!
......
......@@ -2,11 +2,8 @@
module Autocomplete
class UsersFinder
<<<<<<< HEAD
prepend EE::Autocomplete::UsersFinder
=======
>>>>>>> upstream/master
# The number of users to display in the results is hardcoded to 20, and
# pagination is not supported. This ensures that performance remains
# consistent and removes the need for implementing keyset pagination to
......
......@@ -20,11 +20,8 @@ class User < ActiveRecord::Base
include BlocksJsonSerialization
include WithUploads
include OptionallySearch
<<<<<<< HEAD
prepend EE::User
=======
>>>>>>> upstream/master
DEFAULT_NOTIFICATION_LEVEL = :participating
......@@ -261,14 +258,11 @@ class User < ActiveRecord::Base
scope :external, -> { where(external: true) }
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 }) }
<<<<<<< HEAD
scope :subscribed_for_admin_email, -> { where(admin_email_unsubscribed_at: nil) }
scope :ldap, -> { joins(:identities).where('identities.provider LIKE ?', 'ldap%') }
scope :with_provider, ->(provider) do
joins(:identities).where(identities: { provider: provider })
end
=======
>>>>>>> upstream/master
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 :confirmed, -> { where.not(confirmed_at: nil) }
......
......@@ -378,21 +378,12 @@ describe User do
context 'when filtering by todo authors' do
let(:user1) { create(:user) }
let(:user2) { create(:user) }
<<<<<<< HEAD
before do
create(:todo, user: user1, author: user1, state: :done)
create(:todo, user: user2, author: user2, state: :pending)
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
users = described_class.limit_to_todo_authors(
user: user2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment