提交 670d0e4c 编写于 作者: C cdeneux

[IDM] Fix a regression about LDAP integration introduced with commit

148f4f24 (Perhaps the LDAP integration is no more working)
上级 31273fb6
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
*/ */
package org.flowable.ldap; package org.flowable.ldap;
import org.flowable.engine.cfg.AbstractProcessEngineConfigurator;
import org.flowable.engine.cfg.ProcessEngineConfigurator; import org.flowable.engine.cfg.ProcessEngineConfigurator;
import org.flowable.engine.common.api.FlowableException; import org.flowable.engine.common.api.FlowableException;
import org.flowable.engine.impl.cfg.IdmEngineConfigurator;
import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl; import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.flowable.engine.impl.util.EngineServiceUtil; import org.flowable.engine.impl.util.EngineServiceUtil;
...@@ -28,7 +28,7 @@ import org.flowable.engine.impl.util.EngineServiceUtil; ...@@ -28,7 +28,7 @@ import org.flowable.engine.impl.util.EngineServiceUtil;
* *
* @author Joram Barrez * @author Joram Barrez
*/ */
public class LDAPConfigurator extends AbstractProcessEngineConfigurator { public class LDAPConfigurator extends IdmEngineConfigurator {
protected LDAPConfiguration ldapConfiguration; protected LDAPConfiguration ldapConfiguration;
...@@ -40,6 +40,8 @@ public class LDAPConfigurator extends AbstractProcessEngineConfigurator { ...@@ -40,6 +40,8 @@ public class LDAPConfigurator extends AbstractProcessEngineConfigurator {
@Override @Override
public void configure(ProcessEngineConfigurationImpl processEngineConfiguration) { public void configure(ProcessEngineConfigurationImpl processEngineConfiguration) {
super.configure(processEngineConfiguration);
if (ldapConfiguration == null) { if (ldapConfiguration == null) {
throw new FlowableException("ldapConfiguration is not set"); throw new FlowableException("ldapConfiguration is not set");
} }
......
...@@ -28,37 +28,38 @@ ...@@ -28,37 +28,38 @@
<property name="dataSource" ref="dataSource" /> <property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" /> <property name="transactionManager" ref="transactionManager" />
<property name="databaseSchemaUpdate" value="true" /> <property name="databaseSchemaUpdate" value="true" />
<property name="idmProcessEngineConfigurator"> <property name="configurators">
<bean class="org.flowable.ldap.LDAPConfigurator"> <list>
<bean class="org.flowable.ldap.LDAPConfigurator">
<property name="ldapConfiguration"> <property name="ldapConfiguration">
<bean class="org.flowable.ldap.LDAPConfiguration"> <bean class="org.flowable.ldap.LDAPConfiguration">
<!-- Server connection params --> <!-- Server connection params -->
<property name="server" value="ldap://localhost" /> <property name="server" value="ldap://localhost" />
<property name="port" value="33389" /> <property name="port" value="33389" />
<property name="user" value="uid=admin, ou=users, o=flowable" /> <property name="user" value="uid=admin, ou=users, o=flowable" />
<property name="password" value="pass" /> <property name="password" value="pass" />
<!-- Query params --> <!-- Query params -->
<property name="baseDn" value="o=flowable" /> <property name="baseDn" value="o=flowable" />
<property name="queryUserByUserId" value="(&amp;(objectClass=inetOrgPerson)(uid={0}))" /> <property name="queryUserByUserId" value="(&amp;(objectClass=inetOrgPerson)(uid={0}))" />
<property name="queryUserByFullNameLike" value="(&amp;(objectClass=inetOrgPerson)(|({0}=*{1}*)({2}=*{3}*)))" /> <property name="queryUserByFullNameLike" value="(&amp;(objectClass=inetOrgPerson)(|({0}=*{1}*)({2}=*{3}*)))" />
<property name="queryAllUsers" value="(objectClass=inetOrgPerson)" /> <property name="queryAllUsers" value="(objectClass=inetOrgPerson)" />
<property name="queryGroupsForUser" value="(&amp;(objectClass=groupOfUniqueNames)(uniqueMember={0}))" /> <property name="queryGroupsForUser" value="(&amp;(objectClass=groupOfUniqueNames)(uniqueMember={0}))" />
<property name="queryAllGroups" value="(objectClass=groupOfUniqueNames)" /> <property name="queryAllGroups" value="(objectClass=groupOfUniqueNames)" />
<!-- Attribute config --> <!-- Attribute config -->
<property name="userIdAttribute" value="uid" /> <property name="userIdAttribute" value="uid" />
<property name="userFirstNameAttribute" value="cn" /> <property name="userFirstNameAttribute" value="cn" />
<property name="userLastNameAttribute" value="sn" /> <property name="userLastNameAttribute" value="sn" />
<property name="userEmailAttribute" value="mail" /> <property name="userEmailAttribute" value="mail" />
<property name="groupIdAttribute" value="uid" /> <property name="groupIdAttribute" value="uid" />
<property name="groupNameAttribute" value="cn" /> <property name="groupNameAttribute" value="cn" />
</bean> </bean>
</property> </property>
</bean> </bean>
</list>
</property> </property>
</bean> </bean>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册