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
ab37a095
Commit
ab37a095
authored
Mar 20, 2014
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for nested Active Directory groups
parent
cc768fdd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
CHANGELOG-EE
CHANGELOG-EE
+1
-0
lib/gitlab/ldap/adapter.rb
lib/gitlab/ldap/adapter.rb
+4
-0
lib/gitlab/ldap/group.rb
lib/gitlab/ldap/group.rb
+7
-1
No files found.
CHANGELOG-EE
View file @
ab37a095
v 6.7.0
- Improve LDAP sign-in speed by reusing connections
- Add support for Active Directory nested LDAP groups
v 6.5.0
- Add reset permissions button to Group#members page
...
...
lib/gitlab/ldap/adapter.rb
View file @
ab37a095
...
...
@@ -106,6 +106,10 @@ module Gitlab
users
(
*
args
).
first
end
def
dn_matches_filter?
(
dn
,
filter
)
ldap
.
search
(
base:
dn
,
filter:
filter
,
attributes:
%w{dn}
).
any?
end
private
def
config
...
...
lib/gitlab/ldap/group.rb
View file @
ab37a095
...
...
@@ -41,8 +41,10 @@ module Gitlab
def
has_member?
(
user
)
if
memberuid?
member_uids
.
include?
(
user
.
uid
)
elsif
member_dns
.
include?
(
user
.
dn
)
true
else
member_dns
.
include?
(
user
.
dn
)
adapter
.
dn_matches_filter?
(
user
.
dn
,
active_directory_recursive_memberof_filter
)
end
end
...
...
@@ -61,6 +63,10 @@ module Gitlab
private
def
active_directory_recursive_memberof_filter
Net
::
LDAP
::
Filter
.
ex
(
"memberOf:1.2.840.113556.1.4.1941"
,
entry
.
dn
)
end
def
entry
@entry
end
...
...
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