Adding Users in Teams - search for partly username not working

Hello,

I do struggle with the feature of adding users to teams by parts of their username. The setting “discoverable_by_name” is active for all users by default and it isn’t deactivated for users I tested with.
I can add users, when I enter their full username, but this is not convinient and doesn’t act as described in the Configuration options.

Do I have to set up something different?

ParadeDB for our postgresql database is also in use.

I hope, to get some help in here.

Sincerely, Simon Sonntag

This sounds more like a tokenization issue than the discoverable_by_name setting. ParadeDB/pg_search generally indexes whole tokens, so a substring in the middle of a username may not match; typing the start of the username could work better than an arbitrary fragment. It would be worth checking whether Vikunja’s user search goes through ParadeDB at all, and comparing behavior with ParadeDB disabled or with a direct SQL LIKE on the users table. If prefix search works but infix search doesn’t, that points to the search backend rather than permissions.

Welcome :waving_hand:

The username is never partially searched, you’ll need to pass the full username. The setting only applies for the display name.

Oh, this explains it… Thanks!
Since we are using ldap for user authentication and sync, the display name is forced. But the sync doesn’t work correctly - I guess it looks for the wrong field - so it is an empty string.

Therefore, I now have to fix the ldap sync. This should be doable.

Thanks for the great work, Konrad!

Well,
we use Active Directory. The attribute for DisplayName is “displayname” or “DisplayName”. I just assume the ldap sync is not case-sensitive in this manner.
However, I cannot get the DisplayName synced.

I use the vikunja-cli “user update” feature, thinking, that the attribute should be synced that way. Maybe I am wrong with that?

Does it work with any of the settings described here? LDAP Authentication