Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4ace6dbf
Commit
4ace6dbf
authored
Oct 14, 2014
by
Jan-Willem van der Meer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix merge conflicts
parent
f4d43ed3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
27 deletions
+10
-27
lib/gitlab/ldap/access.rb
lib/gitlab/ldap/access.rb
+10
-16
lib/gitlab/ldap/person.rb
lib/gitlab/ldap/person.rb
+0
-6
spec/lib/gitlab/ldap/access_spec.rb
spec/lib/gitlab/ldap/access_spec.rb
+0
-5
No files found.
lib/gitlab/ldap/access.rb
View file @
4ace6dbf
...
...
@@ -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
...
...
lib/gitlab/ldap/person.rb
View file @
4ace6dbf
...
...
@@ -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
)
...
...
spec/lib/gitlab/ldap/access_spec.rb
View file @
4ace6dbf
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment