Bug #1333: Fix issue as property and search query are needed for group strategy too
FEA: ItEr76S04BugFixing
This commit is contained in:
parent
deee4e8bd3
commit
71647c475e
3 changed files with 3 additions and 14 deletions
|
|
@ -117,10 +117,6 @@ public class ConfigurationController extends GenericForwardComposer {
|
|||
|
||||
private Textbox ldapGroupPath;
|
||||
|
||||
private Textbox ldapRoleProperty;
|
||||
|
||||
private Textbox ldapSearchQuery;
|
||||
|
||||
private Radiogroup strategy;
|
||||
|
||||
@Override
|
||||
|
|
@ -161,13 +157,9 @@ public class ConfigurationController extends GenericForwardComposer {
|
|||
if (getLdapConfiguration().getLdapGroupStrategy()) {
|
||||
strategy.setSelectedIndex(0);
|
||||
ldapGroupPath.setDisabled(false);
|
||||
ldapSearchQuery.setDisabled(true);
|
||||
ldapRoleProperty.setDisabled(true);
|
||||
} else {
|
||||
strategy.setSelectedIndex(1);
|
||||
ldapGroupPath.setDisabled(true);
|
||||
ldapSearchQuery.setDisabled(false);
|
||||
ldapRoleProperty.setDisabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -341,14 +341,13 @@ public class LDAPCustomAuthenticationProvider extends
|
|||
|
||||
String queryRoles = configuration.getLdapSearchQuery().replace(
|
||||
USER_ID_SUBSTITUTION, username);
|
||||
String groupsPath = configuration.getLdapGroupPath();
|
||||
|
||||
Set<ConfigurationRolesLDAP> rolesLdap = configuration
|
||||
.getConfigurationRolesLdap();
|
||||
|
||||
try {
|
||||
|
||||
if (null == groupsPath || groupsPath.isEmpty()) {
|
||||
if (!configuration.getLdapGroupStrategy()) {
|
||||
// The LDAP has a node strategy for groups,
|
||||
// we must check the roleProperty in user node.
|
||||
return getRolesUsingNodeStrategy(rolesLdap, queryRoles,
|
||||
|
|
|
|||
|
|
@ -348,16 +348,14 @@
|
|||
<row>
|
||||
<label value="${i18n:_('Role property')}" />
|
||||
<hbox>
|
||||
<textbox id="ldapRoleProperty" value="@{configurationController.ldapConfiguration.ldapRoleProperty}" width="300px"
|
||||
disabled="@{configurationController.ldapGroupStrategy}" />
|
||||
<textbox id="ldapRoleProperty" value="@{configurationController.ldapConfiguration.ldapRoleProperty}" width="300px" />
|
||||
<label value="${i18n:__('Example: {0}', 'member')}" />
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${i18n:_('Role search query')}" />
|
||||
<hbox>
|
||||
<textbox id="ldapSearchQuery" value="@{configurationController.ldapConfiguration.ldapSearchQuery}" width="300px"
|
||||
disabled="@{configurationController.ldapGroupStrategy}" />
|
||||
<textbox id="ldapSearchQuery" value="@{configurationController.ldapConfiguration.ldapSearchQuery}" width="300px" />
|
||||
<label value="${i18n:__('Example: {0}', 'uid=[USER_ID],ou=people,dc=example,dc=org')}" />
|
||||
</hbox>
|
||||
</row>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue