Revision 3f6151d7
Added by Viktor Gurov almost 5 years ago
src/usr/local/www/system_authservers.php | ||
---|---|---|
163 | 163 |
$pconfig['ldap_nostrip_at'] = isset($a_server[$id]['ldap_nostrip_at']); |
164 | 164 |
$pconfig['ldap_allow_unauthenticated'] = isset($a_server[$id]['ldap_allow_unauthenticated']); |
165 | 165 |
$pconfig['ldap_rfc2307'] = isset($a_server[$id]['ldap_rfc2307']); |
166 |
$pconfig['ldap_rfc2307_userdn'] = isset($a_server[$id]['ldap_rfc2307_userdn']); |
|
166 | 167 |
|
167 | 168 |
if (!$pconfig['ldap_binddn'] || !$pconfig['ldap_bindpw']) { |
168 | 169 |
$pconfig['ldap_anon'] = true; |
... | ... | |
347 | 348 |
} else { |
348 | 349 |
unset($server['ldap_rfc2307']); |
349 | 350 |
} |
351 |
if ($pconfig['ldap_rfc2307_userdn'] == "yes") { |
|
352 |
$server['ldap_rfc2307_userdn'] = true; |
|
353 |
} else { |
|
354 |
unset($server['ldap_rfc2307_userdn']); |
|
355 |
} |
|
350 | 356 |
|
351 | 357 |
|
352 | 358 |
if (!$pconfig['ldap_anon']) { |
... | ... | |
747 | 753 |
'object rather than using groups listed on user object. Leave unchecked '. |
748 | 754 |
'for Active Directory style group membership (RFC 2307bis).'); |
749 | 755 |
|
756 |
$group = new Form_Group('RFC 2307 User DN'); |
|
757 |
$group->addClass('ldap_rfc2307_userdn'); |
|
758 |
|
|
759 |
$group->add(new Form_Checkbox( |
|
760 |
'ldap_rfc2307_userdn', |
|
761 |
'RFC 2307 user DN', |
|
762 |
'RFC 2307 Use DN for username search.', |
|
763 |
$pconfig['ldap_rfc2307_userdn'] |
|
764 |
))->setHelp('Use DN for username search, i.e. "(member=CN=Username,CN=Users,DC=example,DC=com)".'); |
|
765 |
|
|
766 |
$section->add($group); |
|
767 |
|
|
750 | 768 |
$section->addInput(new Form_Input( |
751 | 769 |
'ldap_attr_groupobj', |
752 | 770 |
'Group Object Class', |
... | ... | |
1011 | 1029 |
|
1012 | 1030 |
hideClass('ldapanon', $('#ldap_anon').prop('checked')); |
1013 | 1031 |
hideClass('extended', !$('#ldap_extended_enabled').prop('checked')); |
1032 |
hideClass('ldap_rfc2307_userdn', !$('#ldap_rfc2307').prop('checked')); |
|
1014 | 1033 |
set_required_port_fields(); |
1015 | 1034 |
|
1016 | 1035 |
if ($('#ldap_port').val() == "") |
... | ... | |
1053 | 1072 |
hideClass('extended', !this.checked); |
1054 | 1073 |
}); |
1055 | 1074 |
|
1075 |
$('#ldap_rfc2307').click(function () { |
|
1076 |
hideClass('ldap_rfc2307_userdn', !this.checked); |
|
1077 |
}); |
|
1078 |
|
|
1056 | 1079 |
$('#radius_srvcs').on('change', function() { |
1057 | 1080 |
set_required_port_fields(); |
1058 | 1081 |
}); |
Also available in: Unified diff
Use user DN for RFC2307 membership search (updated). Issue #9527