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