[Zope-Checkins] CVS: Zope/lib/python/Products/Sessions/dtml - addDataManager.dtml:1.5 addIdManager.dtml:1.4 manageDataManager.dtml:1.5 manageIdManager.dtml:1.5

Chris McDonough chrism@zope.com
Sat, 17 Nov 2001 11:08:11 -0500


Update of /cvs-repository/Zope/lib/python/Products/Sessions/dtml
In directory cvs.zope.org:/tmp/cvs-serv27973/dtml

Modified Files:
	addDataManager.dtml addIdManager.dtml manageDataManager.dtml 
	manageIdManager.dtml 
Log Message:
As per suggestions by Amos, I changed the terminology used by the browser id manager and session data manager.  Previous to the change, browser ids were known as "tokens".  I've changed this to "browser id" in the docs as well as in all API methods that used the name "token".  Interfaces, permissions, and help have been updated with the changes.


=== Zope/lib/python/Products/Sessions/dtml/addDataManager.dtml 1.4 => 1.5 ===
 communicates with a Browser Id Manager to determine the session information
 for the current user, and hands out Session Data Objects related to that
-user obtained from a Transient Object Container.
+user.
 </div>
 </tr>
 <TR>
@@ -58,7 +58,7 @@
   </td>
   <td align="LEFT" valign="TOP">
   	<input class="form-element" type="TEXT" name="requestName"
-		value="SESSION">
+         value="SESSION">
   </td>
 </tr>
 


=== Zope/lib/python/Products/Sessions/dtml/addIdManager.dtml 1.3 => 1.4 ===
 <TABLE CELLSPACING="2">
 <tr>
+<td>&nbsp;</td>
+</tr>
+<tr>
 <div class="form-help">
-Zope Browser Id Manager objects perform the task of setting and retrieving
-Zope browser ids for remote users.  They are used primarily by Session
-Data Manager objects.  A Browser Id Manager's 'id' must always be
-'browser_id_manager' in order for it to be found by Session Data Managers.
+Zope Browser Id Manager objects allow Zope to differentiate between site
+visitors by "tagging" each of their browsers with a unique identifier. This
+is useful if you need to tell visitors apart from one another even if they do
+not "log in" to your site.  Browser Id Managers are generally used
+by interacting with the Zope sessioning machinery.
 </div>
 </tr>
+<tr>
+<td>&nbsp;</td>
+</tr>
 <TR>
   <TD ALIGN="LEFT" VALIGN="TOP">
     <div class="form-label">
@@ -23,7 +30,7 @@
     </div>
   </TD>
   <TD ALIGN="LEFT" VALIGN="TOP">
-    <div class="form-label">This object's Zope id will be<br>
+    <div class="form-label">This object's Zope id must be<br>
     "browser_id_manager"
     </div>
   </TD>
@@ -41,56 +48,51 @@
 <TR>
   <TD ALIGN="LEFT" VALIGN="TOP">
     <div class="form-label">
-      Browser Token Key
+      Browser Id Name
     </div>
   </TD>
   <TD ALIGN="LEFT" VALIGN="TOP">
-    <INPUT TYPE="TEXT" NAME="tokenkey" SIZE="20" value="_ZopeId">
+    <INPUT TYPE="TEXT" NAME="idname" SIZE="20" value="_ZopeId">
   </TD>
 </TR>
 <tr>
 <td>&nbsp;</td>
 </tr>
-<th align="left"><strong><em>Token Key Search Namespaces</strong></em></th>
-<th align="left"><strong><em>Priority (1 is highest)</strong></em></th>
 <tr>
-  <th align=left class="form-label">Cookies</th>
-   <td>
-   <table border=1>
-   <tr>
-   <td align=left>
-    <input type="radio" name="cookiepri:int" value="1" CHECKED> 1
-   </td>
+<td>
+<div align=left class="form-label">Look for Browser Id Name in</th>
+</td>
+<td>
+<table border=0>
+<tr>
    <td align=left>
-    <input type="radio" name="cookiepri:int" value="2"> 2
+    <input type="radio" name="location" value="cookiesonly"> Cookies only
    </td>
+</tr>
+<tr>
    <td align=left>
-    <input type="radio" name="cookiepri:int" value="0"> Off
+    <input type="radio" name="location" value="cookiesthenform" CHECKED> Cookies then form
    </td>
-   </tr>
-   </table>
-  </td>
 </tr>
 <tr>
-  <th align=left class="form-label">Form vars</th>
-   <td align=left>
-   <table border=1>
-   <tr>
    <td align=left>
-    <input type="radio" name="formpri:int" value="1"> 1
-   </td>
+    <input type="radio" name="location" value="formonly"> Form only
+   </td> 
+</tr>
+<tr>
    <td align=left>
-    <input type="radio" name="formpri:int" value="2" CHECKED> 2
+    <input type="radio" name="location" value="formthencookies"> Form then cookies
    </td>
-   <td align=left>
-    <input type="radio" name="formpri:int" value="0"> Off
-   </td>   </tr>
-   </table>
-  </td>
 </tr>
-<td>&nbsp;</td>
+</table>
+</td>
+</tr>
+
+
 <tr>
+<td>&nbsp;</td>
 </tr>
+
 <TR>
   <TD ALIGN="LEFT" VALIGN="TOP">
     <div class="form-label">


=== Zope/lib/python/Products/Sessions/dtml/manageDataManager.dtml 1.4 => 1.5 ===
 <form action="manage_changeSDM" method="post">
 <table cellspacing="2">
+
+<tr><td>&nbsp;</td></tr>
+<tr>
+<td class="form-help" colspan=2>
+  A Session Data Manager object is responsible for maintaining a 
+  relationship between session data objects and Zope browser ids.
+  It is part of the Zope sessioning machinery.  Programmers may
+  interact with a session data manager in order to obtain
+  information about session data, but will more often use the
+  REQUEST.SESSION object to do sessioning-related tasks.
+</td>
+</tr>
+<tr><td>&nbsp;</td></tr>
+
 <tr>
   <td align="left" valign="top">
     <div class="form-label">
@@ -40,7 +54,7 @@
   </td>
   <td align="LEFT" valign="TOP">
   	<input class="form-element" type="TEXT" name="requestName"
-		value="&dtml-getrequestName;">
+		value="&dtml-getRequestName;">
   </td>
 </tr>
 <tr>


=== Zope/lib/python/Products/Sessions/dtml/manageIdManager.dtml 1.4 => 1.5 ===
 <FORM ACTION="manage_changeBrowserIdManager" METHOD="POST">
 <TABLE CELLSPACING="2">
-<TR>
-  <dtml-comment> 
-  <TD ALIGN="LEFT" VALIGN="TOP">
-    <div class="form-label">
-      Browser Id Mgr On
-    </div>
-  </TD>
-  <TD ALIGN="LEFT" VALIGN="TOP">
-    <INPUT TYPE="checkbox" NAME="on"
-     <dtml-if isOn>CHECKED</dtml-if>>
-  </TD>
-  </dtml-comment>
-  <input type="hidden" name="on" value="1">
-</TR>
+<tr>
+  <td>&nbsp;<td>
+</tr>
+<tr class="form-help">
+  <td colspan=2>
+  Zope Browser Id Manager objects allow Zope to differentiate between site
+  visitors by "tagging" each of their browsers with a unique identifier. This
+  is useful if you need to tell visitors apart from one another even if they do
+  not "log in" to your site.  Browser Id Managers are generally used
+  by interacting with the Zope sessioning machinery.
+  </td>
+</tr>
+<tr>
+  <td>&nbsp;<td>
+</tr>
 <TR>
   <TD ALIGN="LEFT" VALIGN="TOP">
     <div class="form-label">
@@ -34,57 +35,50 @@
 <TR>
   <TD ALIGN="LEFT" VALIGN="TOP">
     <div class="form-label">
-      Browser Token Key
+      Browser Id Name
     </div>
   </TD>
   <TD ALIGN="LEFT" VALIGN="TOP">
-    <INPUT TYPE="TEXT" NAME="tokenkey" SIZE="20" value="&dtml-getTokenKey;">
+    <INPUT TYPE="TEXT" NAME="idname" SIZE="20" value="&dtml-getBrowserIdName;">
   </TD>
 </TR>
-<th align=left><strong><em>Token Key Search Namespaces</strong></em></th>
-<th align=left><strong><em>Priority</strong></em> (1 is highest)</th>
+
+<dtml-let loc=getBrowserIdLocation>
+<tr>
+<td>
+<div align=left class="form-label">Look for Browser Id Name in</th>
+</td>
+<td>
+<table border=0>
 <tr>
-  <th align=left class="form-label">Cookies</th>
-   <td align=left>
-   <table border=1>
-   <tr>
-   <td align=left>
-    <input type="radio" name="cookiepri:int" value="1"
-     <dtml-if "getTokenKeyNamespaces().get(1, _.None) == 'cookies'">CHECKED</dtml-if>>1
-   </td>
-   <td align=left>
-    <input type="radio" name="cookiepri:int" value="2"
-     <dtml-if "getTokenKeyNamespaces().get(2, _.None) == 'cookies'">CHECKED</dtml-if>>2
-   </td>
    <td align=left>
-    <input type="radio" name="cookiepri:int" value="0"
-    <dtml-if "'cookies' not in getTokenKeyNamespaces().values()">CHECKED</dtml-if>>Off
-   </td>
-   </tr>
-   </table>
+    <input type="radio" name="location" value="cookiesonly"
+     <dtml-if "loc=='cookiesonly'">CHECKED</dtml-if>> Cookies only
    </td>
 </tr>
 <tr>
-  <th align=left class="form-label">Form vars</th>
-   <td align=left>
-   <table border=1>
-   <tr>
    <td align=left>
-    <input type="radio" name="formpri:int" value="1"
-     <dtml-if "getTokenKeyNamespaces().get(1, _.None) == 'form'">CHECKED</dtml-if>>1
+    <input type="radio" name="location" value="cookiesthenform"
+    <dtml-if "loc=='cookiesthenform'">CHECKED</dtml-if>> Cookies then form
    </td>
+</tr>
+<tr>
    <td align=left>
-    <input type="radio" name="formpri:int" value="2"
-     <dtml-if "getTokenKeyNamespaces().get(2, _.None) == 'form'">CHECKED</dtml-if>>2
-   </td>
+    <input type="radio" name="location" value="formonly"
+     <dtml-if "loc=='formonly'">CHECKED</dtml-if>> Form only
+   </td> 
+</tr>
+<tr>
    <td align=left>
-    <input type="radio" name="formpri:int" value="0"
-    <dtml-if "'form' not in getTokenKeyNamespaces().values()">CHECKED</dtml-if>>Off
-   </td>
-   </tr>
-   </table>
+    <input type="radio" name="location" value="formthencookies"
+     <dtml-if "loc=='formthencookies'">CHECKED</dtml-if>> Form then cookies
    </td>
 </tr>
+</table>
+</td>
+</tr>
+</dtml-let>
+
 <TR>
   <TD ALIGN="LEFT" VALIGN="TOP">
     <div class="form-label">
@@ -107,7 +101,7 @@
     <div class="form-help">
     leave blank to send cookies without domain <br>
     info -- however, if cookie domain is not blank,<br>
-    it must contain at least two dots)
+    it must contain at least two dots
     </div>
   </TD>
   <TD ALIGN="LEFT" VALIGN="TOP">