Fix some issues pending in previous commit
* Updated database changelog to set properly the default value of the new field. * Disable some fields in configuration window depending on the LDAP strategy selected. FEA: ItEr74S09LdapAuhentication
This commit is contained in:
parent
232ecd220d
commit
f4e2a7d8ae
4 changed files with 24 additions and 5 deletions
|
|
@ -71,6 +71,8 @@ public class LDAPConfiguration extends BaseEntity {
|
|||
// LDAP roles will be used or not
|
||||
private Boolean ldapSaveRolesDB = false;
|
||||
|
||||
// LDAP strategy if true means group strategy if false means property
|
||||
// strategy
|
||||
private Boolean ldapGroupStrategy = true;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -328,5 +328,13 @@
|
|||
<addColumn tableName="configuration">
|
||||
<column name="ldap_group_strategy" type="BOOLEAN" />
|
||||
</addColumn>
|
||||
<addDefaultValue tableName="configuration"
|
||||
columnName="ldap_group_strategy"
|
||||
defaultValueBoolean="TRUE" />
|
||||
<addNotNullConstraint tableName="configuration"
|
||||
columnName="ldap_group_strategy"
|
||||
defaultNullValue="TRUE"
|
||||
columnDataType="BOOLEAN" />
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
|
|
|||
|
|
@ -113,8 +113,6 @@ public class ConfigurationController extends GenericForwardComposer {
|
|||
|
||||
private Checkbox scenariosVisible;
|
||||
|
||||
private Component ldapRoles;
|
||||
|
||||
private UserRole roles;
|
||||
|
||||
private Textbox ldapGroupPath;
|
||||
|
|
@ -841,4 +839,12 @@ public class ConfigurationController extends GenericForwardComposer {
|
|||
return configurationModel.isChangedDefaultPasswdAdmin();
|
||||
}
|
||||
|
||||
public boolean isLdapGroupStrategy() {
|
||||
return getLdapConfiguration().getLdapGroupStrategy();
|
||||
}
|
||||
|
||||
public boolean isLdapPropertyStrategy() {
|
||||
return !getLdapConfiguration().getLdapGroupStrategy();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -340,21 +340,24 @@
|
|||
<row>
|
||||
<label value="${i18n:_('Group path')}" />
|
||||
<hbox>
|
||||
<textbox id="ldapGroupPath" value="@{configurationController.ldapConfiguration.ldapGroupPath}" width="300px"/>
|
||||
<textbox id="ldapGroupPath" value="@{configurationController.ldapConfiguration.ldapGroupPath}" width="300px"
|
||||
disabled="@{configurationController.ldapPropertyStrategy}" />
|
||||
<label value="${i18n:__('Example: {0}', 'ou=groups')}" /><label value="${i18n:_('(If it is empty, a node strategy is used)')}" />
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${i18n:_('Role property')}" />
|
||||
<hbox>
|
||||
<textbox id="ldapRoleProperty" value="@{configurationController.ldapConfiguration.ldapRoleProperty}" width="300px"/>
|
||||
<textbox id="ldapRoleProperty" value="@{configurationController.ldapConfiguration.ldapRoleProperty}" width="300px"
|
||||
disabled="@{configurationController.ldapGroupStrategy}" />
|
||||
<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"/>
|
||||
<textbox id="ldapSearchQuery" value="@{configurationController.ldapConfiguration.ldapSearchQuery}" width="300px"
|
||||
disabled="@{configurationController.ldapGroupStrategy}" />
|
||||
<label value="${i18n:__('Example: {0}', 'uid=[USER_ID],ou=people,dc=example,dc=org')}" />
|
||||
</hbox>
|
||||
</row>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue