Fix merge conflicts

parent f4d43ed3
...@@ -14,15 +14,10 @@ module Gitlab ...@@ -14,15 +14,10 @@ module Gitlab
end end
def self.allowed?(user) def self.allowed?(user)
<<<<<<< HEAD
self.open do |access| self.open do |access|
if access.allowed?(user)
access.update_permissions(user)
access.update_email(user)
=======
self.open(user) do |access|
if access.allowed? if access.allowed?
>>>>>>> master access.update_permissions
access.update_email
user.last_credential_check_at = Time.now user.last_credential_check_at = Time.now
user.save user.save
true true
...@@ -49,7 +44,14 @@ module Gitlab ...@@ -49,7 +44,14 @@ module Gitlab
false false
end end
<<<<<<< HEAD def adapter
@adapter ||= Gitlab::LDAP::Adapter.new(provider)
end
def ldap_config
Gitlab::LDAP::Config.new(provider)
end
def get_ldap_user(user) def get_ldap_user(user)
@ldap_user ||= Gitlab::LDAP::Person.find_by_dn(user.extern_uid) @ldap_user ||= Gitlab::LDAP::Person.find_by_dn(user.extern_uid)
end end
...@@ -167,14 +169,6 @@ module Gitlab ...@@ -167,14 +169,6 @@ module Gitlab
# TODO: Test if nil value of current_access_level in handled properly # TODO: Test if nil value of current_access_level in handled properly
[current_access_level, max_group_access_level].compact.max [current_access_level, max_group_access_level].compact.max
=======
def adapter
@adapter ||= Gitlab::LDAP::Adapter.new(provider)
end
def ldap_config
Gitlab::LDAP::Config.new(provider)
>>>>>>> master
end end
end end
end end
......
...@@ -6,16 +6,10 @@ module Gitlab ...@@ -6,16 +6,10 @@ module Gitlab
# Source: http://ctogonewild.com/2009/09/03/bitmask-searches-in-ldap/ # Source: http://ctogonewild.com/2009/09/03/bitmask-searches-in-ldap/
AD_USER_DISABLED = Net::LDAP::Filter.ex("userAccountControl:1.2.840.113556.1.4.803", "2") AD_USER_DISABLED = Net::LDAP::Filter.ex("userAccountControl:1.2.840.113556.1.4.803", "2")
<<<<<<< HEAD
def self.find_by_uid(uid, adapter=nil)
adapter ||= Gitlab::LDAP::Adapter.new
adapter.user(Gitlab.config.ldap.uid, uid)
=======
attr_accessor :entry, :provider attr_accessor :entry, :provider
def self.find_by_uid(uid, adapter) def self.find_by_uid(uid, adapter)
adapter.user(adapter.config.uid, uid) adapter.user(adapter.config.uid, uid)
>>>>>>> master
end end
def self.find_by_dn(dn, adapter) def self.find_by_dn(dn, adapter)
......
...@@ -39,7 +39,6 @@ describe Gitlab::LDAP::Access do ...@@ -39,7 +39,6 @@ describe Gitlab::LDAP::Access do
end end
end end
end end
<<<<<<< HEAD
describe :update_permissions do describe :update_permissions do
subject { access.update_permissions(user) } subject { access.update_permissions(user) }
...@@ -359,7 +358,3 @@ objectclass: posixGroup ...@@ -359,7 +358,3 @@ objectclass: posixGroup
end end
end end
end end
=======
end
>>>>>>> master
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