Fix merge conflicts

parent f4d43ed3
......@@ -14,15 +14,10 @@ module Gitlab
end
def self.allowed?(user)
<<<<<<< HEAD
self.open do |access|
if access.allowed?(user)
access.update_permissions(user)
access.update_email(user)
=======
self.open(user) do |access|
if access.allowed?
>>>>>>> master
access.update_permissions
access.update_email
user.last_credential_check_at = Time.now
user.save
true
......@@ -49,7 +44,14 @@ module Gitlab
false
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)
@ldap_user ||= Gitlab::LDAP::Person.find_by_dn(user.extern_uid)
end
......@@ -167,14 +169,6 @@ module Gitlab
# TODO: Test if nil value of current_access_level in handled properly
[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
......
......@@ -6,16 +6,10 @@ module Gitlab
# 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")
<<<<<<< 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
def self.find_by_uid(uid, adapter)
adapter.user(adapter.config.uid, uid)
>>>>>>> master
end
def self.find_by_dn(dn, adapter)
......
......@@ -39,7 +39,6 @@ describe Gitlab::LDAP::Access do
end
end
end
<<<<<<< HEAD
describe :update_permissions do
subject { access.update_permissions(user) }
......@@ -359,7 +358,3 @@ objectclass: posixGroup
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