留言板

LDAP - Advanced filter settings

thumbnail
Manuel Hoyos,修改在9 年前。

LDAP - Advanced filter settings

Junior Member 帖子: 60 加入日期: 12-6-11 最近的帖子
Hi!

Is it possible to add more than one filter to import users from ldap ? That is to add more than one criterion to property ldap.import.user.search.filter criteria to refine imported users.

Thanks!!!
thumbnail
Christoph Rabel,修改在9 年前。

RE: LDAP - Advanced filter settings

Liferay Legend 帖子: 1554 加入日期: 09-9-24 最近的帖子
I am not sure if I understand this request correctly.
Why don't you just add both criteria to the filter?
thumbnail
Manuel Hoyos,修改在9 年前。

RE: LDAP - Advanced filter settings

Junior Member 帖子: 60 加入日期: 12-6-11 最近的帖子
OK ,

I tried to add two conditions to filter .

ie-

ldap.import.user.search.filter = ( objectClass = inetOrgPerson ) ( EmployeeType = external)

Is it possible?

There any connector ?

thank you
thumbnail
Christoph Rabel,修改在9 年前。

RE: LDAP - Advanced filter settings

Liferay Legend 帖子: 1554 加入日期: 09-9-24 最近的帖子
You need to write it this way:
AND:
(&( objectClass = inetOrgPerson ) ( EmployeeType = external))
OR:
(| (objectClass = inetOrgPerson ) ( EmployeeType = external))

Basically it is something like:
(Operator(A)(B )(C))

It is recursive, so you could do something like:

(&( (| (objectClass = inetOrgPerson ) ( EmployeeType = external)) ) ( EmployeeType = something))

hth
thumbnail
Ravi Kumar Gupta,修改在9 年前。

RE: LDAP - Advanced filter settings

Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
Any valid filter should work. The best would be to search manually on your ldap and see what is the correct filter to be used. You should be able to verify the results for the filter. Remember, wildcards like * work with filters. You could also try like (objectClass=*)...

In the code above, you should use like this..
If you need both -- like mandatory
(&( objectClass = inetOrgPerson )( EmployeeType = external))