the GroupMembershipControlPanel clean the searchstring in the request and pass it to the membership search in UsersGroupsControlPanelView.
An empty searchstring is like a intention "list all users" and a violation against the option many_users = True. The search with empty searchstring should not be performed.
With the following patch, all is fine ;-)
if searchGroups:
if not self.many_groups or bool(searchString):
groupResults = searchView.merge(chain(*[searchView.searchGroups(**{field: searchString}) for field in ['id', 'title']]), 'groupid')
groupResults = [gtool.getGroupById(g['id']) for g in groupResults if g['id'] not in ignore]
groupResults.sort(key=lambda x: x is not None and normalizeString(x.getGroupTitleOrName()))
if searchUsers:
if not self.many_users or bool(searchString):
userResults = searchView.merge(chain(*[searchView.searchUsers(**{field: searchString}) for field in ['login', 'fullname', 'email']]), 'userid')
userResults = [mtool.getMemberById(u['id']) for u in userResults if u['id'] not in ignore]
userResults.sort(key=lambda x: x is not None and x.getProperty('fullname') is not None and normalizeString(x.getProperty('fullname')) or '')
What I did:
testgroup1
via /@@usergroup-groupprefsplone.many_users
andplone.many_groups
toTrue
testgroup1
with reader, editor roles/@@usergroup-groupmembership?groupname=testgroup1
What I expect to happen:
What actually happened:
What version of Plone/ Addons I am using:
Some investigations
the GroupMembershipControlPanel clean the searchstring in the request and pass it to the membership search in UsersGroupsControlPanelView.
An empty searchstring is like a intention "list all users" and a violation against the option
many_users = True
. The search with empty searchstring should not be performed.With the following patch, all is fine ;-)