From: John Graham-C. <jgr...@us...> - 2005-04-07 19:55:24
|
Update of /cvsroot/popfile/engine/skins/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21537/skins/default Modified Files: common-middle.thtml users-page.thtml Log Message: More work on v0.23.0 (Multi-user Support) Add account association and allow different users to log in. Users can be associated with specific accounts when POPFile is in multi-user mode. Currently every user has a blank password. Also cloning of per-bucket parameters is not working. Would love to have volunteers to do the following: 1. Test out the new functionality for account association 2. Write code to do per-bucket parameter cloning (see Bayes.pm TODO) 3. Write code to set/reset user passwords. --- Classifer/Bayes.pm: Add functions for handling account creation and deletion and mapping of accounts to users. Add new message called CREAT used to pass a child generated session to the parent. Proxy/Proxy.pm Proxy/POP3.pm: Add code for handling users associated with accounts and use it in the POP3 module to lookup users dynamically when they are logged in. UI/HTML.pm: Update UI to be able to handle different users using the cookie and changes to the History API. Add code to the users_page to handle account association on a per user basis. UI/HTTP.pm: Add url_decode_ and decode form parameters. POPFile/MQ.pm: Comment the CREAT message. POPFile/History.pm: Make history mechanism aware of different users so that different users get a different view of the history. skins/default/user_page.thtml: Add code for handling account association. languages/English.msg: Additional strings needed for the account handling. --- Once this is all working we can start to fix the test suite and nail down the v0.23.0 release. Index: users-page.thtml =================================================================== RCS file: /cvsroot/popfile/engine/skins/default/users-page.thtml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** users-page.thtml 15 Feb 2005 04:23:55 -0000 1.2 --- users-page.thtml 7 Apr 2005 19:55:09 -0000 1.3 *************** *** 2,5 **** --- 2,21 ---- <TMPL_INCLUDE NAME="common-middle.thtml"> + <form action="/users" method="post"> + <table cellpadding="10%" cellspacing="0" class="settingsTable" width="100%"> + <tr> + <td class="settingsPanel" valign="top"> + + <TMPL_IF NAME="Users_If_Single"> + <span class="securityWidgetStateOn"><TMPL_VAR NAME="Localize_Users_SingleUserMode"><br /><TMPL_VAR NAME="Localize_Yes"></span> + <input type="submit" class="submit toggleOn" name="usermode" value="<TMPL_VAR NAME="Localize_ChangeToNo">" /> + <input type="hidden" name="singleuser" value="0"> + </td></tr></table></form> + <TMPL_ELSE> + <span class="securityWidgetStateOff"><TMPL_VAR NAME="Localize_Users_SingleUserMode"><br /><TMPL_VAR NAME="Localize_No"></span> + <input type="submit" class="submit toggleOn" name="usermode" value="<TMPL_VAR NAME="Localize_ChangeToYes">" /> + <input type="hidden" name="singleuser" value="1"> + </td></tr></table></form> + <table cellpadding="10%" cellspacing="0" class="settingsTable" width="100%"> <tr> *************** *** 52,61 **** <input type="submit" class="submit" name="edituser" value="<TMPL_VAR NAME="Localize_Edit">" /> - <br /> <TMPL_IF NAME="Users_If_Editing_User"> <br /><hr /> <h3><TMPL_VAR NAME="Localize_Users_Parameters"> (<TMPL_VAR NAME="Users_Edit_User_Name">)</h3> <table width="100%"> <tr> --- 68,131 ---- <input type="submit" class="submit" name="edituser" value="<TMPL_VAR NAME="Localize_Edit">" /> + </form> <TMPL_IF NAME="Users_If_Editing_User"> <br /><hr /> + <h3><TMPL_VAR NAME="Localize_Users_Accounts"> (<TMPL_VAR NAME="Users_Edit_User_Name">)</h3> + + <form action="/users" method="post"> + <TMPL_IF NAME="Users_If_Accounts"> + <table width="75%" class="accountsTable" summary="<TMPL_VAR NAME="Localize_Users_AccountTableSummary">"> + <tr> + <th class="usersLabel" scope="col" align="left"> + <TMPL_VAR NAME="Localize_Account"> + </th> + <th class="usersLabel" scope="col"> + <TMPL_VAR NAME="Localize_Remove"> + </th> + </tr> + + <TMPL_LOOP NAME="Users_Loop_Accounts"> + + <TMPL_IF NAME="__odd__"> + <tr class="rowOdd"> + <TMPL_ELSE> + <tr class="rowEven"> + </TMPL_IF> + + <td> + <TMPL_VAR NAME="Account"> + </td> + <td align="center"> + <input type="checkbox" class="checkbox" name="remove_<TMPL_VAR NAME="Account">" /> + <TMPL_VAR NAME="Localize_Remove"> + </td> + </tr> + + </TMPL_LOOP> <!-- Loop Accounts --> + + <tr> + <td> + </td> + <td align="center"> + <input type="submit" class="submit deleteButton" name="delete" value="<TMPL_VAR NAME="Localize_Remove">" /> + </td> + </tr> + </table> + <br /> + </TMPL_IF> + + <TMPL_VAR NAME="Localize_Users_AddAccount">: + <input type="text" value="" name="newaccount"> + <input type="submit" name="addaccount" value="<TMPL_VAR NAME="Localize_Add">"> + + <input type="hidden" name="editname" value="<TMPL_VAR NAME="Users_Edit_User_Name">" /> + <input type="hidden" name="edituser" value="<TMPL_VAR NAME="Users_Edit_User_Name">" /> + </form> + + <hr /> <h3><TMPL_VAR NAME="Localize_Users_Parameters"> (<TMPL_VAR NAME="Users_Edit_User_Name">)</h3> + <form action="/users" method="post"> <table width="100%"> <tr> *************** *** 106,109 **** --- 176,181 ---- </table> + </TMPL_IF> + <TMPL_INCLUDE NAME="common-before-configuration.thtml"> <TMPL_INCLUDE NAME="configuration-bar.thtml"> Index: common-middle.thtml =================================================================== RCS file: /cvsroot/popfile/engine/skins/default/common-middle.thtml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** common-middle.thtml 4 Mar 2005 23:40:38 -0000 1.12 --- common-middle.thtml 7 Apr 2005 19:55:09 -0000 1.13 *************** *** 14,18 **** <tr> <td class="head"><TMPL_VAR NAME="Localize_Header_Title"></td> ! <td class="headShutdown" align="right" valign="bottom"><TMPL_IF NAME="Header_If_Password"><TMPL_ELSE><a class="logoutLink" href="/logout"><TMPL_VAR NAME="Localize_Logout"></a> <TMPL_IF NAME="Common_Middle_If_CanAdmin"><a class="shutdownLink" href="/shutdown"><TMPL_VAR NAME="Localize_Header_Shutdown"></a></TMPL_IF></TMPL_IF> </td> </tr> </table> --- 14,18 ---- <tr> <td class="head"><TMPL_VAR NAME="Localize_Header_Title"></td> ! <td class="headShutdown" align="right" valign="bottom"><TMPL_IF NAME="Header_If_Password"><TMPL_ELSE><TMPL_IF NAME="Header_If_SingleUser"><TMPL_ELSE><a class="logoutLink" href="/logout"><TMPL_VAR NAME="Localize_Logout"></a> <TMPL_IF NAME="Common_Middle_If_CanAdmin"><a class="shutdownLink" href="/shutdown"><TMPL_VAR NAME="Localize_Header_Shutdown"></a></TMPL_IF></TMPL_IF></TMPL_IF> </td> </tr> </table> |