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