File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
lib/github/ldap/member_of Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,17 @@ class Recursive
10
10
# Internal: The GitHub::Ldap object to search domains with.
11
11
attr_reader :ldap
12
12
13
+ # Internal: The maximum depth to search for subgroups.
14
+ attr_reader :depth
15
+
13
16
# Public: Instantiate new search strategy.
14
17
#
15
18
# - ldap: GitHub::Ldap object
16
- # - options: Hash of options (unused)
19
+ # - options: Hash of options
17
20
def initialize ( ldap , options = { } )
18
21
@ldap = ldap
19
22
@options = options
23
+ @depth = options [ :depth ]
20
24
end
21
25
22
26
# Public: Performs search for groups an entry is a member of, including
@@ -51,7 +55,9 @@ def domains
51
55
# subgroups with.
52
56
def search_strategy
53
57
@search_strategy ||=
54
- GitHub ::Ldap ::Members ::Recursive . new ( ldap , attrs : %w( objectClass ) )
58
+ GitHub ::Ldap ::Members ::Recursive . new ldap ,
59
+ depth : depth ,
60
+ attrs : %w( objectClass )
55
61
end
56
62
57
63
# Internal: Returns true if the entry is a group.
You can’t perform that action at this time.
0 commit comments