Skip to content

Commit

Permalink
Merge pull request #41 from vollnhals/master
Browse files Browse the repository at this point in the history
fix: group may not be present
  • Loading branch information
Arcath committed Sep 17, 2013
2 parents dab44d7 + dd69a2c commit 9db2d98
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/adauth/ad_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ def cn_groups_nested
@cn_groups_nested = cn_groups
cn_groups.each do |group|
ado = Adauth::AdObjects::Group.where('name', group).first
groups = convert_to_objects ado.cn_groups
groups.each do |g|
@cn_groups_nested.push g if !(@cn_groups_nested.include?(g))
if ado
groups = convert_to_objects ado.cn_groups
groups.each do |g|
@cn_groups_nested.push g if !(@cn_groups_nested.include?(g))
end
end
end
return @cn_groups_nested
Expand Down Expand Up @@ -199,4 +201,4 @@ def return_symbol_value(field)
end
end
end
end
end

0 comments on commit 9db2d98

Please sign in to comment.