We can search group folder with an empty string.

We'll add a  pluggable authentication utility:


  >>> print http(r"""
  ... POST /++etc++site/default/@@contents.html HTTP/1.1
  ... Authorization: Basic bWdyOm1ncnB3
  ... Content-Length: 98
  ... Content-Type: application/x-www-form-urlencoded
  ... Referer: http://localhost:8081/++etc++site/default/@@contents.html?type_name=BrowserAdd__zope.app.authentication.authentication.PluggableAuthentication
  ... 
  ... type_name=BrowserAdd__zope.app.authentication.authentication.PluggableAuthentication&new_value=PAU""")
  HTTP/1.1 303 See Other
  ...


And register it:

  >>> print http(r"""
  ... POST /++etc++site/default/PAU/addRegistration.html HTTP/1.1
  ... Authorization: Basic bWdyOm1ncnB3
  ... Content-Length: 699
  ... Content-Type: multipart/form-data; boundary=---------------------------191720529414243436931796477300
  ... Referer: http://localhost:8081/++etc++site/default/PAU/addRegistration.html
  ... 
  ... -----------------------------191720529414243436931796477300
  ... Content-Disposition: form-data; name="field.comment"
  ... 
  ... 
  ... -----------------------------191720529414243436931796477300
  ... Content-Disposition: form-data; name="field.actions.register"
  ... 
  ... Register
  ... -----------------------------191720529414243436931796477300--
  ... """)
  HTTP/1.1 303 See Other
  ...


Next, we'll add the group folder:

  >>> print http(r"""
  ... POST /++etc++site/default/PAU/+/AddGroupFolder.html%3D HTTP/1.1
  ... Authorization: Basic bWdyOm1ncnB3
  ... Content-Length: 427
  ... Content-Type: multipart/form-data; boundary=---------------------------4150524541658557772058105275
  ... Referer: http://localhost:8081/++etc++site/default/PAU/+/AddGroupFolder.html=
  ... 
  ... -----------------------------4150524541658557772058105275
  ... Content-Disposition: form-data; name="field.prefix"
  ... 
  ... groups
  ... -----------------------------4150524541658557772058105275
  ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
  ... 
  ... Add
  ... -----------------------------4150524541658557772058105275
  ... Content-Disposition: form-data; name="add_input_name"
  ... 
  ... groups
  ... -----------------------------4150524541658557772058105275--
  ... """)
  HTTP/1.1 303 See Other
  ...


And add some groups:


  >>> print http(r"""
  ... POST /++etc++site/default/PAU/groups/+/AddGroupInformation.html%3D HTTP/1.1
  ... Authorization: Basic bWdyOm1ncnB3
  ... Content-Length: 550
  ... Content-Type: multipart/form-data; boundary=---------------------------12719796373012316301953477158
  ... Referer: http://localhost:8081/++etc++site/default/PAU/groups/+/AddGroupInformation.html=
  ... 
  ... -----------------------------12719796373012316301953477158
  ... Content-Disposition: form-data; name="field.title"
  ... 
  ... Test1
  ... -----------------------------12719796373012316301953477158
  ... Content-Disposition: form-data; name="field.description"
  ... 
  ... 
  ... -----------------------------12719796373012316301953477158
  ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
  ... 
  ... Add
  ... -----------------------------12719796373012316301953477158
  ... Content-Disposition: form-data; name="add_input_name"
  ... 
  ... Test1
  ... -----------------------------12719796373012316301953477158--
  ... """)
  HTTP/1.1 303 See Other
  ...


  >>> print http(r"""
  ... POST /++etc++site/default/PAU/groups/+/AddGroupInformation.html%3D HTTP/1.1
  ... Authorization: Basic bWdyOm1ncnB3
  ... Content-Length: 550
  ... Content-Type: multipart/form-data; boundary=---------------------------10816732208483809451400699513
  ... Referer: http://localhost:8081/++etc++site/default/PAU/groups/+/AddGroupInformation.html=
  ... 
  ... -----------------------------10816732208483809451400699513
  ... Content-Disposition: form-data; name="field.title"
  ... 
  ... Test2
  ... -----------------------------10816732208483809451400699513
  ... Content-Disposition: form-data; name="field.description"
  ... 
  ... 
  ... -----------------------------10816732208483809451400699513
  ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
  ... 
  ... Add
  ... -----------------------------10816732208483809451400699513
  ... Content-Disposition: form-data; name="add_input_name"
  ... 
  ... Test2
  ... -----------------------------10816732208483809451400699513--
  ... """)
  HTTP/1.1 303 See Other
  ...


Now we'll configure our pluggable-authentication utility to use the
group folder:


  >>> print http(r"""
  ... POST /++etc++site/default/PAU/@@configure.html HTTP/1.1
  ... Authorization: Basic bWdyOm1ncnB3
  ... Content-Length: 1040
  ... Content-Type: multipart/form-data; boundary=---------------------------1786480431902757372789659730
  ... Referer: http://localhost:8081/++etc++site/default/PAU/@@configure.html
  ... 
  ... -----------------------------1786480431902757372789659730
  ... Content-Disposition: form-data; name="field.credentialsPlugins.to"
  ... 
  ... U2Vzc2lvbiBDcmVkZW50aWFscw==
  ... -----------------------------1786480431902757372789659730
  ... Content-Disposition: form-data; name="field.credentialsPlugins-empty-marker"
  ... 
  ... 
  ... -----------------------------1786480431902757372789659730
  ... Content-Disposition: form-data; name="field.authenticatorPlugins.to"
  ... 
  ... Z3JvdXBz
  ... -----------------------------1786480431902757372789659730
  ... Content-Disposition: form-data; name="field.authenticatorPlugins-empty-marker"
  ... 
  ... 
  ... -----------------------------1786480431902757372789659730
  ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
  ... 
  ... Change
  ... -----------------------------1786480431902757372789659730
  ... Content-Disposition: form-data; name="field.credentialsPlugins"
  ... 
  ... U2Vzc2lvbiBDcmVkZW50aWFscw==
  ... -----------------------------1786480431902757372789659730
  ... Content-Disposition: form-data; name="field.authenticatorPlugins"
  ... 
  ... Z3JvdXBz
  ... -----------------------------1786480431902757372789659730--
  ... """)
  HTTP/1.1 200 Ok
  ...


Now, if we search for a group, but don't supply a string:

  >>> print http(r"""
  ... POST /@@grant.html HTTP/1.1
  ... Authorization: Basic bWdyOm1ncnB3
  ... Content-Length: 166
  ... Content-Type: application/x-www-form-urlencoded
  ... Referer: http://localhost:8081/@@grant.html
  ... 
  ... field.principal.displayed=y&"""
  ... "field.principal.MC5ncm91cHM_.field.search=&"
  ... "field.principal.MC5ncm91cHM_.search=Search&"
  ... "field.principal.MQ__.searchstring=")
  HTTP/1.1 200 Ok
  ...Test1...Test2...

We get both of our groups in the result.
