Commit 746706d1 authored by James Edwards-Jones's avatar James Edwards-Jones

Fix conflicts in Auth::User classes, user routes and LDAP callback controller

parent d6a97dab
class Ldap::OmniauthCallbacksController < OmniauthCallbacksController
extend ::Gitlab::Utils::Override
<<<<<<< HEAD
prepend EE::OmniauthCallbacksController
prepend EE::Ldap::OmniauthCallbacksController
=======
>>>>>>> upstream/master
def self.define_providers!
return unless Gitlab::Auth::LDAP::Config.enabled?
......
<<<<<<< HEAD
## EE-specific
get 'unsubscribes/:email', to: 'unsubscribes#show', as: :unsubscribe
post 'unsubscribes/:email', to: 'unsubscribes#create'
## EE-specific
=======
>>>>>>> upstream/master
# Allows individual providers to be directed to a chosen controller
# Call from inside devise_scope
def override_omniauth(provider, controller, path_prefix = '/users/auth')
......
......@@ -9,10 +9,7 @@ module Gitlab
module LDAP
class User < Gitlab::Auth::OAuth::User
extend ::Gitlab::Utils::Override
<<<<<<< HEAD
prepend ::EE::Gitlab::Auth::LDAP::User
=======
>>>>>>> upstream/master
class << self
def find_by_uid_and_provider(uid, provider)
......
......@@ -20,7 +20,6 @@ module Gitlab
user ||= find_or_build_ldap_user if auto_link_ldap_user?
user ||= build_new_user if signup_enabled?
<<<<<<< HEAD
if user_in_required_group?
unblock_user(user, "in required group") if user.persisted? && user.blocked?
elsif user.persisted?
......@@ -32,12 +31,6 @@ module Gitlab
if user
user.external = !(auth_hash.groups & saml_config.external_groups).empty? if external_users_enabled?
user.admin = !(auth_hash.groups & saml_config.admin_groups).empty? if admin_groups_enabled?
=======
if external_users_enabled? && user
# Check if there is overlap between the user's groups and the external groups
# setting then set user as external or internal.
user.external = !(auth_hash.groups & saml_config.external_groups).empty?
>>>>>>> upstream/master
end
user
......@@ -56,7 +49,6 @@ module Gitlab
Gitlab::Auth::Saml::Config
end
<<<<<<< HEAD
def block_user(user, reason)
user.ldap_block
log_user_changes(user, "#{reason}, blocking")
......@@ -79,8 +71,6 @@ module Gitlab
required_groups.empty? || !(auth_hash.groups & required_groups).empty?
end
=======
>>>>>>> upstream/master
def auto_link_saml_user?
Gitlab.config.omniauth.auto_link_saml_user
end
......
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