Update application.rb
This commit is contained in:
parent
949540854c
commit
9654487ff7
@ -87,15 +87,16 @@ class Application
|
|||||||
base: ldap_user_conf[:base],
|
base: ldap_user_conf[:base],
|
||||||
filter: format_groups_for_ldap_users(@groups, ldap_user_conf[:filter]),
|
filter: format_groups_for_ldap_users(@groups, ldap_user_conf[:filter]),
|
||||||
attributes: [name_attribute, :dn]
|
attributes: [name_attribute, :dn]
|
||||||
) do |entry|
|
)
|
||||||
else
|
else
|
||||||
res = @ldap.search(
|
res = @ldap.search(
|
||||||
base: ldap_user_conf[:base],
|
base: ldap_user_conf[:base],
|
||||||
filter: ldap_user_conf[:filter],
|
filter: ldap_user_conf[:filter],
|
||||||
attributes: [name_attribute, :dn]
|
attributes: [name_attribute, :dn]
|
||||||
) do |entry|
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
res.each do |entry|
|
||||||
name = entry[name_attribute].first
|
name = entry[name_attribute].first
|
||||||
|
|
||||||
unless name
|
unless name
|
||||||
@ -172,15 +173,16 @@ class Application
|
|||||||
base: ldap_group_conf[:base],
|
base: ldap_group_conf[:base],
|
||||||
filter: format_groups_for_ldap_users(@groups, ldap_user_conf[:filter]),
|
filter: format_groups_for_ldap_users(@groups, ldap_user_conf[:filter]),
|
||||||
attributes: [name_attribute, member_attribute, :dn]
|
attributes: [name_attribute, member_attribute, :dn]
|
||||||
) do |entry|
|
)
|
||||||
else
|
else
|
||||||
res = @ldap.search(
|
res = @ldap.search(
|
||||||
base: ldap_group_conf[:base],
|
base: ldap_group_conf[:base],
|
||||||
filter: ldap_group_conf[:filter],
|
filter: ldap_group_conf[:filter],
|
||||||
attributes: [name_attribute, member_attribute, :dn]
|
attributes: [name_attribute, member_attribute, :dn]
|
||||||
) do |entry|
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
res.each do |entry|
|
||||||
name = entry[name_attribute].first
|
name = entry[name_attribute].first
|
||||||
|
|
||||||
unless name
|
unless name
|
||||||
|
Reference in New Issue
Block a user