Feature Request: Adding users via name or email

Adding users to teams has been quite frustrating as it is quite difficult to search for members.
It turns out that the main problem is that it seems like only searching for the username field of the user will work. Not the name or email field. Making things even more confusing, the username is only ever displayed in /user/settings/caldav. Everywhere else, like the name that is displayed in the top right corner, the name field is displayed. This means that asking someone for their username often doesn’t help you to add them to a team.
It would be super helpful if this could be fixed. Additionally, it would be nice if the query logic itself would give more results based on similar queries. Often it seems like you only get results when you have a 1:1 match of the username which also makes it harder to discover the right name.
Next to this, displaying the email in the popup of queried users would be good to avoid sometimes very ambiguous results.

The email address is not exposed ever - this is a conscious decision. Keep in mind that Vikunja is not only used for private environments, there are also public installations (most notably probably the one run by the creator). In this case, you’d never want to have the mail address of a user exposed.

Even if the mail would not be returned, the ability alone to search by the mail would give too much away. At the very least it would need to be an optional feature and it would require the user to opt-in to this behaviour (or opt-out, but this is already a more critical discussion).

What I like though is to display the username more prominently. Also, do you have specific examples where the matching logic doesn’t work well? In our environment I’ve made the experience that it actually works reasonably well

The choice to keep the email hidden makes sense, thanks for the explanation!

I think I’ve found the solution to my problems at least, as I discovered that there is actually these settings:

Allow other users to add me as a member to teams or projects when they search for my name
Allow other users to add me as a member to teams or projects when they search for my full email

I’ve enabled this for all the users in my Vikunja instance now, and the results are much better!
The matching logic also works quite well now.

My testing shows the searching problems only seem to an issue when searching for the username or email, which both need an exact match to show anything. Meanwhile searching by name (the thing displayed in the upper right corner) works very well - as long as people have the setting enabled.

I think it would be good to change the username matching logic to show in case of partial matches too.

In some way I also think this behavior should be more visible to people. The username is hardly ever shown apart from this random settings site /user/settings/caldav. As this is the only way to add someone who doesn’t have their name or email exposed, there should be a hint in the team edit menu that tells you “you can only search for people’s name or email if they have it enabled, otherwise you need to get their username which can be found here XYZ”.
Or the whole functionality should change and searching by name should be enabled by default.

This is not the case for a reason, similar to email search - we don’t want users being able to enumerate all users on the server by searching for a, then b, then c and so on.

Usually you know your own username because it’s what you’ve used to log in?

Our members don’t know their username because it is automatically assigned when logging in via SSO. The field that it uses from the SSO varies a lot between username and email, so we don’t know all the time what to use.

My current solution is to run an update on the database to enable the setting for everyone regularly. Maybe a config option could be used to enable search by email/username by default on an instance level + remove the option to configure this yourself?

You can set a bunch of options as default: Config options | Vikunja

The users can still disable it themselves still.

1 Like