Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
port r37684 (fix to source widget hasInput and assiciated changes) fr…
…om trunk
- Loading branch information
Gary Poster
committed
Aug 3, 2005
0 parents
commit 171b9e6
Showing
2 changed files
with
582 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,241 @@ | ||
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.status" | ||
... | ||
... Active | ||
... -----------------------------191720529414243436931796477300 | ||
... Content-Disposition: form-data; name="field.status-empty-marker" | ||
... | ||
... 1 | ||
... -----------------------------191720529414243436931796477300 | ||
... Content-Disposition: form-data; name="field.permission" | ||
... | ||
... | ||
... -----------------------------191720529414243436931796477300 | ||
... Content-Disposition: form-data; name="field.permission-empty-marker" | ||
... | ||
... 1 | ||
... -----------------------------191720529414243436931796477300 | ||
... Content-Disposition: form-data; name="UPDATE_SUBMIT" | ||
... | ||
... Add | ||
... -----------------------------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 | ||
... | ||
|
||
|
||
Register group folder pulgin. | ||
|
||
>>> print http(r""" | ||
... POST /++etc++site/default/PAU/groups/addRegistration.html HTTP/1.1 | ||
... Authorization: Basic bWdyOm1ncnB3 | ||
... Content-Length: 807 | ||
... Content-Type: multipart/form-data; boundary=---------------------------6689874747253728091673221069 | ||
... Referer: http://localhost:8081/++etc++site/default/PAU/groups/addRegistration.html | ||
... | ||
... -----------------------------6689874747253728091673221069 | ||
... Content-Disposition: form-data; name="field.name" | ||
... | ||
... groups | ||
... -----------------------------6689874747253728091673221069 | ||
... Content-Disposition: form-data; name="field.status" | ||
... | ||
... Active | ||
... -----------------------------6689874747253728091673221069 | ||
... Content-Disposition: form-data; name="field.status-empty-marker" | ||
... | ||
... 1 | ||
... -----------------------------6689874747253728091673221069 | ||
... Content-Disposition: form-data; name="field.permission" | ||
... | ||
... | ||
... -----------------------------6689874747253728091673221069 | ||
... Content-Disposition: form-data; name="field.permission-empty-marker" | ||
... | ||
... 1 | ||
... -----------------------------6689874747253728091673221069 | ||
... Content-Disposition: form-data; name="UPDATE_SUBMIT" | ||
... | ||
... Add | ||
... -----------------------------6689874747253728091673221069-- | ||
... """) | ||
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" | ||
... | ||
... Session Credentials | ||
... -----------------------------1786480431902757372789659730 | ||
... Content-Disposition: form-data; name="field.credentialsPlugins-empty-marker" | ||
... | ||
... | ||
... -----------------------------1786480431902757372789659730 | ||
... Content-Disposition: form-data; name="field.authenticatorPlugins.to" | ||
... | ||
... groups | ||
... -----------------------------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" | ||
... | ||
... Session Credentials | ||
... -----------------------------1786480431902757372789659730 | ||
... Content-Disposition: form-data; name="field.authenticatorPlugins" | ||
... | ||
... groups | ||
... -----------------------------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. |
Oops, something went wrong.