Skip to content

Commit

Permalink
Fixed ftest failures. Yipee.
Browse files Browse the repository at this point in the history
  • Loading branch information
strichter committed Feb 10, 2005
1 parent 4e68a3c commit f7c2ba6
Show file tree
Hide file tree
Showing 4 changed files with 212 additions and 196 deletions.
17 changes: 10 additions & 7 deletions browser/group_searching_with_empty_string.txt
Expand Up @@ -24,14 +24,18 @@ And register it:
...
...
... -----------------------------8474411127918531132143183931
... Content-Disposition: form-data; name="field.interface"
... Content-Disposition: form-data; name="field.provided"
...
... zope.app.security.interfaces.IAuthentication
... -----------------------------8474411127918531132143183931
... Content-Disposition: form-data; name="field.interface-empty-marker"
... Content-Disposition: form-data; name="field.provided-empty-marker"
...
... 1
... -----------------------------8474411127918531132143183931
... Content-Disposition: form-data; name="field.status"
...
... Active
... -----------------------------8474411127918531132143183931
... Content-Disposition: form-data; name="field.permission"
...
...
Expand All @@ -52,17 +56,16 @@ And register it:
Next, we'll add the group folder:

>>> print http(r"""
... POST /++etc++site/@@contents.html HTTP/1.1
... POST /++etc++site/SiteManagement/index.html HTTP/1.1
... Authorization: Basic mgr:mgrpw
... Content-Type: application/x-www-form-urlencoded
... Referer: http://localhost:8081/++etc++site/@@contents.html
...
... container_add_button=Add&single_new_value=tools&single_type_name=BrowserAdd__zope.app.site.folder.SiteManagementFolder""")
HTTP/1.1 303 See Other
... activeTool=IPrincipalSearchPlugin""")
HTTP/1.1 200 Ok
...

>>> print http(r"""
... POST /++etc++site/AddIPrincipalSearchPluginTool/AddGroupFolder.html%3D HTTP/1.1
... POST /++etc++site/SiteManagement/AddGroupFolder.html= HTTP/1.1
... Authorization: Basic mgr:mgrpw
... Content-Type: multipart/form-data; boundary=---------------------------1160081710811409419323271465
... Referer: http://localhost:8081/++etc++site/AddIPrincipalSearchPluginTool/AddGroupFolder.html=
Expand Down
38 changes: 22 additions & 16 deletions browser/groupfolder.txt
Expand Up @@ -15,23 +15,20 @@ Let's walk through an example.

First, we'll create a principal folder:

(The first request is a bit weird. It is part of the current
tools UI. It arranges for a tools site-management folder to be
created. We really need to rethink how we manage TTW utilities.)

>>> print http(r"""
... GET /++etc++site/AddISearchableAuthenticationPluginTool HTTP/1.1
... POST /++etc++site/SiteManagement/index.html HTTP/1.1
... Authorization: Basic mgr:mgrpw
... Referer: http://localhost:8081/++etc++site/@@manageISearchableAuthenticationPluginTool.html
... """)
... Content-Type: application/x-www-form-urlencoded
...
... activeTool=ISearchableAuthenticationPlugin""")
HTTP/1.1 200 Ok
...

>>> print http(r"""
... POST /++etc++site/AddISearchableAuthenticationPluginTool/AddPrincipalFolder.html%3D HTTP/1.1
... POST /++etc++site/SiteManagement/AddPrincipalFolder.html=users HTTP/1.1
... Authorization: Basic mgr:mgrpw
... Content-Type: multipart/form-data; boundary=---------------------------190685539214643056941988788830
... Referer: http://localhost:8081/++etc++site/AddISearchableAuthenticationPluginTool/AddPrincipalFolder.html=
... Referer: http://localhost:8081/++etc++site/SiteManagement/AddPrincipalFolder.html=
...
... -----------------------------190685539214643056941988788830
... Content-Disposition: form-data; name="field.prefix"
Expand All @@ -49,8 +46,6 @@ First, we'll create a principal folder:
... """)
HTTP/1.1 303 See Other
...
Location: ../@@manageISearchableAuthenticationPluginTool.html
...

Next we'l add some users:

Expand Down Expand Up @@ -309,7 +304,16 @@ Next we'l add some users:
Next, we'll add out groups folder:

>>> print http(r"""
... POST /++etc++site/AddIPrincipalSearchPluginTool/AddGroupFolder.html%3D HTTP/1.1
... POST /++etc++site/SiteManagement/index.html HTTP/1.1
... Authorization: Basic mgr:mgrpw
... Content-Type: application/x-www-form-urlencoded
...
... activeTool=IPrincipalSearchPlugin""")
HTTP/1.1 200 Ok
...

>>> print http(r"""
... POST /++etc++site/SiteManagement/AddGroupFolder.html= HTTP/1.1
... Authorization: Basic mgr:mgrpw
... Content-Type: multipart/form-data; boundary=---------------------------18984415031531709165482618952
...
Expand All @@ -329,8 +333,6 @@ Next, we'll add out groups folder:
... """)
HTTP/1.1 303 See Other
...
Location: ../@@manageIPrincipalSearchPluginTool.html
...

Now, before we can define any groups, we have to add and register a
pluggable authentication utility:
Expand All @@ -356,18 +358,22 @@ pluggable authentication utility:
...
...
... -----------------------------1649392783947785437368129046
... Content-Disposition: form-data; name="field.interface"
... Content-Disposition: form-data; name="field.provided"
...
... zope.app.security.interfaces.IAuthentication
... -----------------------------1649392783947785437368129046
... Content-Disposition: form-data; name="field.interface-empty-marker"
... Content-Disposition: form-data; name="field.provided-empty-marker"
...
... 1
... -----------------------------1649392783947785437368129046
... Content-Disposition: form-data; name="field.permission"
...
...
... -----------------------------1649392783947785437368129046
... Content-Disposition: form-data; name="field.status"
...
... Active
... -----------------------------1649392783947785437368129046
... Content-Disposition: form-data; name="field.permission-empty-marker"
...
... 1
Expand Down
23 changes: 11 additions & 12 deletions browser/principalfolder.txt
Expand Up @@ -18,20 +18,17 @@ Bob. Initially, attempts to log in as Bob fail:
To allow Bob to log in, we'll start by adding a principal folder:


(The following request is a bit weird. It is part of the current
tools UI. It arranges for a tools site-management folder to be
created. We really need to rethink how we manage TTW utilities.)

>>> print http(r"""
... GET /++etc++site/AddISearchableAuthenticationPluginTool HTTP/1.1
... POST /++etc++site/SiteManagement/index.html HTTP/1.1
... Authorization: Basic mgr:mgrpw
... Referer: http://localhost:8081/++etc++site/@@manageISearchableAuthenticationPluginTool.html
... """)
... Content-Type: application/x-www-form-urlencoded
...
... activeTool=ISearchableAuthenticationPlugin""")
HTTP/1.1 200 Ok
...

>>> print http(r"""
... POST /++etc++site/AddISearchableAuthenticationPluginTool/AddPrincipalFolder.html%3D HTTP/1.1
... POST /++etc++site/SiteManagement/AddPrincipalFolder.html= HTTP/1.1
... Authorization: Basic mgr:mgrpw
... Content-Length: 434
... Content-Type: multipart/form-data; boundary=---------------------------190685539214643056941988788830
Expand All @@ -53,8 +50,6 @@ To allow Bob to log in, we'll start by adding a principal folder:
... """)
HTTP/1.1 303 See Other
...
Location: ../@@manageISearchableAuthenticationPluginTool.html
...

We specify a prefix, `users.`. This is used to make sure that ids
used by this plugin don't conflict with ids of other plugins. We also
Expand Down Expand Up @@ -138,14 +133,18 @@ register a pluggable authentication utility:
...
...
... -----------------------------1649392783947785437368129046
... Content-Disposition: form-data; name="field.interface"
... Content-Disposition: form-data; name="field.provided"
...
... zope.app.security.interfaces.IAuthentication
... -----------------------------1649392783947785437368129046
... Content-Disposition: form-data; name="field.interface-empty-marker"
... Content-Disposition: form-data; name="field.provided-empty-marker"
...
... 1
... -----------------------------1649392783947785437368129046
... Content-Disposition: form-data; name="field.status"
...
... Active
... -----------------------------1649392783947785437368129046
... Content-Disposition: form-data; name="field.permission"
...
...
Expand Down

0 comments on commit f7c2ba6

Please sign in to comment.