ldap_fluff 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ldap_fluff might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 968768aeccb6bb96fee53a8b9f154c17ecd526a4
4
- data.tar.gz: a0fca576757b57e6a101f9078851c9cc76fd1f58
3
+ metadata.gz: 5648d1eb100608b85c3815cc5ae5a215cd1ce5b0
4
+ data.tar.gz: afb387b8210f7120263b218bb2e3def00a7deb80
5
5
  SHA512:
6
- metadata.gz: f7e0bcce771b22667002b0f580c7844f1f34ff97f4616b9a52709faf0fdc984f8a739dd29a09174df17beab5cac426bfac9ccf9b2d4831237a1c56f8bd7c0884
7
- data.tar.gz: cfc7a9d51be11a588c0c98d3b52e30c2c7fa9fd1a21e40cee80d3606cd3ec40d77430d010ea66df7ff1dde6a1d4e3fdb07bde5926bf27ce0c966b1d31a2137eb
6
+ metadata.gz: 11596e7ac3c290ab3270432bfc0f13fbed11d39a8ebd4daa9f5f699656405b1f5f27c9637afc8a4b08c4829a72e2cbea2084b50d38ff271c48bfa5d1354784cc
7
+ data.tar.gz: 58d72eb169b5df0a0d4f00cb29b44c56e82b7436b5b85e530daf4e17698768e1a3fd211f3e2c07ee0b1d7de344ef3477371196cbe1209aa5de1fae974559728a
@@ -30,11 +30,11 @@ class LdapFluff::ActiveDirectory::MemberService < LdapFluff::GenericMemberServic
30
30
  def _walk_group_ancestry(group_dns = [])
31
31
  set = []
32
32
  group_dns.each do |group_dn|
33
- search = @ldap.search(:base => group_dn, :scope => Net::LDAP::SearchScope_BaseObject)
33
+ search = @ldap.search(:base => group_dn, :scope => Net::LDAP::SearchScope_BaseObject, :attributes => ['memberof'])
34
34
  if !search.nil? && !search.first.nil?
35
35
  group = search.first
36
+ set += _walk_group_ancestry(group[:memberof])
36
37
  set += group[:memberof]
37
- set += _walk_group_ancestry(set)
38
38
  end
39
39
  end
40
40
  set
@@ -11,7 +11,7 @@ class TestADMemberService < MiniTest::Test
11
11
 
12
12
  def basic_user
13
13
  @ldap.expect(:search, ad_user_payload, [:filter => ad_name_filter("john")])
14
- @ldap.expect(:search, ad_parent_payload(1), [:base => ad_group_dn, :scope => 0])
14
+ @ldap.expect(:search, ad_parent_payload(1), [:base => ad_group_dn, :scope => 0, :attributes => ['memberof']])
15
15
  end
16
16
 
17
17
  def basic_group
@@ -21,27 +21,27 @@ class TestADMemberService < MiniTest::Test
21
21
  def nest_deep(n)
22
22
  # add all the expects
23
23
  1.upto(n-1) do |i|
24
- @ldap.expect(:search, ad_parent_payload(i + 1), [:base => ad_group_dn("bros#{i}"), :scope => 0])
24
+ @ldap.expect(:search, ad_parent_payload(i + 1), [:base => ad_group_dn("bros#{i}"), :scope => 0, :attributes => ['memberof']])
25
25
  end
26
26
  # terminate or we loop FOREVER
27
- @ldap.expect(:search, [], [:base => ad_group_dn("bros#{n}"), :scope => 0])
27
+ @ldap.expect(:search, [], [:base => ad_group_dn("bros#{n}"), :scope => 0, :attributes => ['memberof']])
28
28
  end
29
29
 
30
30
  def double_nested(n)
31
31
  # add all the expects
32
32
  1.upto(n - 1) do |i|
33
- @ldap.expect(:search, ad_double_payload(i + 1), [:base => ad_group_dn("bros#{i}"), :scope => 0])
33
+ @ldap.expect(:search, ad_double_payload(i + 1), [:base => ad_group_dn("bros#{i}"), :scope => 0, :attributes => ['memberof']])
34
34
  end
35
35
  # terminate or we loop FOREVER
36
- @ldap.expect(:search, [], [:base => ad_group_dn("bros#{n}"), :scope => 0])
36
+ @ldap.expect(:search, [], [:base => ad_group_dn("bros#{n}"), :scope => 0, :attributes => ['memberof']])
37
37
  (n - 1).downto(1) do |j|
38
- @ldap.expect(:search, [], [:base => ad_group_dn("broskies#{j + 1}"), :scope => 0])
38
+ @ldap.expect(:search, [], [:base => ad_group_dn("broskies#{j + 1}"), :scope => 0, :attributes => ['memberof']])
39
39
  end
40
40
  end
41
41
 
42
42
  def test_find_user
43
43
  basic_user
44
- @ldap.expect(:search, [], [:base => ad_group_dn('bros1'), :scope => 0])
44
+ @ldap.expect(:search, [], [:base => ad_group_dn('bros1'), :scope => 0, :attributes => ['memberof']])
45
45
  @adms.ldap = @ldap
46
46
  assert_equal(%w(group bros1), @adms.find_user_groups("john"))
47
47
  @ldap.verify
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ldap_fluff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan O'Mara
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-07-27 00:00:00.000000000 Z
15
+ date: 2015-09-09 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: net-ldap