Ticket #6853 (closed Bug: fixed)

Opened 5 years ago

Last modified 4 years ago

User search doesn't match on username, only on fullname

Reported by: limi Owned by: erikrose
Priority: major Milestone: 3.0.4
Component: Users/Groups Keywords:
Cc:

Description

When trying to add local sharing permissions to people, I discovered that the search doesn't match on username, which is odd.

How to reproduce:

  1. Create a user with the ID "testuser" and full name "Test User"
  2. Go to a folder, click the Sharing tab
  3. Try searching for "testuser" — it doesn't show up — searching for "test user" instead works

Change History

comment:1 Changed 5 years ago by optilude

This seems to be a general problem with acl_users.searchUsers(). I've got the same problem in borg.project, for example. I think it's also a problem on the user/groups admin page.

comment:2 Changed 4 years ago by wichert

  • Owner changed from wichert to limi

The problem here is that the user interface (or the underlying view) expects magic that is not there: with PAS you always search for a user property. And there is no property which contains both the userid and the username, and it would not make sense since they are very different things.

You could update code to do two searches: one on the full name and one on the userid. Or you could restore the old Plone behaviour where you had a dropdown which allowed you to select what kind of search key you want to use.

At any rate this is not a problem in the user management part of Plone.

comment:3 Changed 4 years ago by cbcunc

Just reporting that this *is* a problem in the user mgmt part of Plone. Optilude is right. It does show up on the users/groups admin page. 2.5.x allowed searching on either userid or fullname without a dropdown. Even older versions allowed searching on email address. As an admin of many Plone sites with lots of users, these things get used every day. Dropdown with fullname preselected would probably be OK solution.

comment:4 Changed 4 years ago by erikrose

  • Owner changed from limi to erikrose

comment:5 Changed 4 years ago by erikrose

  • Status changed from new to closed
  • Resolution set to fixed

(In [18225]) Fixed #6853. There's a similar bug in the Users and Groups site setup section, but I'll open a separate ticket for that.

comment:6 Changed 4 years ago by erikrose

That separate ticket is #7420. I'll probably factor this fix up while fixing that.

While we're at it, these two role-setting pages are very similar. Why isn't more code shared?

Note: See TracTickets for help on using tickets.