You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(28) |
Nov
(58) |
Dec
(85) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(125) |
Feb
(222) |
Mar
(274) |
Apr
(51) |
May
(22) |
Jun
(50) |
Jul
(15) |
Aug
(33) |
Sep
(11) |
Oct
(29) |
Nov
(17) |
Dec
(1) |
2003 |
Jan
(100) |
Feb
(21) |
Mar
(7) |
Apr
(45) |
May
|
Jun
(43) |
Jul
(27) |
Aug
(24) |
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
(1) |
Feb
|
Mar
(13) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(7) |
Sep
|
Oct
|
Nov
|
Dec
(4) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Rob H. <for...@us...> - 2003-01-06 01:25:59
|
Update of /cvsroot/sandweb/sandweb/bin In directory sc8-pr-cvs1:/tmp/cvs-serv17125/bin Modified Files: sandweb.cgi Log Message: images are implemented, the installer needs some work to really support it ( the image_dir is configurable in the /etc/sandweb.cfg ) and the "Go" button _really_ sucks, but here it is :) Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.336 retrieving revision 1.337 diff -U2 -r1.336 -r1.337 --- sandweb.cgi 5 Jan 2003 22:19:58 -0000 1.336 +++ sandweb.cgi 6 Jan 2003 01:25:56 -0000 1.337 @@ -804,4 +804,6 @@ } + my $image_dir = $config->{'webserver'}->{'image_dir'}; + my $toolbar_menu = $ui->get_menu( MENU => 'tool_bar', @@ -810,4 +812,5 @@ REPO_NAME => $repo_name, LOCATION => $location, + IMAGE_DIR => $image_dir, ); @@ -901,4 +904,6 @@ } + my $image_dir = $config->{'webserver'}->{'image_dir'}; + my $content = $ui->get_menu( MENU => 'configuration', @@ -906,4 +911,5 @@ FULL_NAME => $full_name, CONFIRM_DELETE => $confirm_delete_checked, + IMAGE_DIR => $image_dir, ); @@ -1083,4 +1089,6 @@ } + my $image_dir = $config->{'webserver'}->{'image_dir'}; + my $content = $ui->get_menu( MENU => 'repository', @@ -1095,4 +1103,5 @@ REPO_USERNAME => $repo_username, REMEMBER_REPO_PASSWORD => $remember_repo_password, + IMAGE_DIR => $image_dir, ); @@ -1463,4 +1472,6 @@ } + my $image_dir = $config->{'webserver'}->{'image_dir'}; + my $content = $ui->get_menu( MENU => 'delete', @@ -1471,4 +1482,5 @@ REPO_NAME => $repo_name, MAIN_WINDOW_URL => $main_window_url, + IMAGE_DIR => $image_dir, ); print $cgi->header( -cookie => $ck_auth ); @@ -1548,4 +1560,6 @@ } else { + my $image_dir = $config->{'webserver'}->{'image_dir'}; + my $content = $ui->get_menu( MENU => 'rename', @@ -1556,4 +1570,5 @@ FILENAME => $filename, PREVIOUS_URL => $prev_url, + IMAGE_DIR => $image_dir, ); @@ -1636,4 +1651,6 @@ my $prev_url = "$ENV{'HTTP_REFERER'}"; + my $image_dir = $config->{'webserver'}->{'image_dir'}; + my $content = $ui->get_menu( MENU => 'create_folder', @@ -1643,4 +1660,5 @@ REPO_NAME => $repo_name, PREVIOUS_URL => $prev_url, + IMAGE_DIR => $image_dir, ); print $cgi->header( -cookie => $ck_auth ); @@ -1676,4 +1694,6 @@ my $prev_url = "$ENV{'HTTP_REFERER'}"; + my $image_dir = $config->{'webserver'}->{'image_dir'}; + my $content = $ui->get_menu( MENU => 'upload', @@ -1683,4 +1703,5 @@ REPO_NAME => $repo_name, PREVIOUS_URL => $prev_url, + IMAGE_DIR => $image_dir, ); print $cgi->header( -cookie => $ck_auth ); @@ -1794,4 +1815,6 @@ } + my $image_dir = $config->{'webserver'}->{'image_dir'}; + my $content = $ui->get_menu( MENU => 'vcs', @@ -1804,4 +1827,5 @@ REPO_NAME => $repo_name, MAIN_WINDOW_URL => $main_window_url, + IMAGE_DIR => $image_dir, ); print $cgi->header( -cookie => $ck_auth ); @@ -2468,4 +2492,7 @@ exit; } + + my $image_dir = $config->{'webserver'}->{'image_dir'}; + my $content = $ui->get_menu( MENU => 'commit', @@ -2475,4 +2502,5 @@ PROGNAME => $progname, FILENAME => "@filename", + IMAGE_DIR => $image_dir, ); print $cgi->header( -cookie => $ck_auth ); |
From: Rob H. <for...@us...> - 2003-01-06 00:35:19
|
Update of /cvsroot/sandweb/sandweb/templates In directory sc8-pr-cvs1:/tmp/cvs-serv3492 Modified Files: delete.html repository.html repository.js submitform.js tool_bar.html vcs.html Log Message: * fixed repository commit stuff, just needed a hidden variable defined on the form so I could redifine it in javascript :) it uses anchor tags now * started working on image integration Index: delete.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/delete.html,v retrieving revision 1.3 retrieving revision 1.4 diff -U2 -r1.3 -r1.4 --- delete.html 6 Oct 2002 07:12:48 -0000 1.3 +++ delete.html 6 Jan 2003 00:35:16 -0000 1.4 @@ -16,5 +16,5 @@ <input type="hidden" name="module_name" value="<TMPL_VAR NAME=MODULE_NAME>"> <input type="hidden" name="repo_name" value="<TMPL_VAR NAME=REPO_NAME>"> - <input name="Submit" value="1" type="submit" value="Ok"> + <input name="Submit" value="1" type="submit" value="Done"> </form> </center> Index: repository.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/repository.html,v retrieving revision 1.21 retrieving revision 1.22 diff -U2 -r1.21 -r1.22 --- repository.html 4 Jan 2003 22:55:41 -0000 1.21 +++ repository.html 6 Jan 2003 00:35:16 -0000 1.22 @@ -1,3 +1,3 @@ -<form name="repository" method="post"> +<form name="repository" method="get"> <!-- <TMPL_VAR NAME=PROGNAME> --> <input type="hidden" name="action" value="repository"> @@ -96,5 +96,12 @@ <td width="25%" align="center"> <br> - <input type="submit" name="Submit" Value="Commit" onClick="javascript:{doSubmit('Commit');}"> + <input type="hidden" name="Submit"> + + <a href="javascript:{document.repository.Submit.value='Commit';doSubmit('Commit');}"><img src="<TMPL_VAR NAME=IMAGE_DIR>/commit.png" alt="Commit" title="Commit"</a> + + + + <a href="javascript:{document.repository.Submit.value='Delete';doSubmit('Delete');}"><img src="<TMPL_VAR NAME=IMAGE_DIR>/delete.png" alt="Delete" title="Delete"</a> + <!-- <a href="javascript:{doSubmit('Delete');}" onMouseOver="rollOver(2)" onMouseO @@ -102,6 +109,4 @@ <TMPL_VAR NAME=LANG>.gif" width="79" height="20" name="button2"></a> --> - - <input type="submit" name="Submit" Value="Delete" onClick="javascript:{doSubmit('Delete');}"> </td> <td width="60%" align="center"> Index: repository.js =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/repository.js,v retrieving revision 1.5 retrieving revision 1.6 diff -U2 -r1.5 -r1.6 --- repository.js 15 Aug 2002 08:02:41 -0000 1.5 +++ repository.js 6 Jan 2003 00:35:16 -0000 1.6 @@ -1,8 +1,8 @@ function checkForm(clicked) { if (clicked == 'Delete') { - if (confirm("Deleting this repository will also delete all modules checked out from this repository. Are you sure you wish to do this?")) { + if (confirm("Deleting this repository will also delete all modules checked out from this repository. Are you sure you wish to do this?")) { return true; - } - } + } + } else if (clicked == 'Commit') { if (isEmpty(document.repository.repo_name.value)) { @@ -22,5 +22,5 @@ else { return true; - } + } return false; } Index: submitform.js =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/submitform.js,v retrieving revision 1.4 retrieving revision 1.5 diff -U2 -r1.4 -r1.5 --- submitform.js 5 Jan 2003 21:37:52 -0000 1.4 +++ submitform.js 6 Jan 2003 00:35:16 -0000 1.5 @@ -4,12 +4,7 @@ function doSubmit(clicked) { - var submitOk = false; - if (checkForm(clicked)) { - submitOk = true - } - -// if (submitOk) { -// submitForm(clicked); -// } + if (checkForm(clicked)) { + submitForm(clicked); + } } Index: tool_bar.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/tool_bar.html,v retrieving revision 1.14 retrieving revision 1.15 diff -U2 -r1.14 -r1.15 --- tool_bar.html 16 Sep 2002 05:06:48 -0000 1.14 +++ tool_bar.html 6 Jan 2003 00:35:16 -0000 1.15 @@ -9,8 +9,11 @@ <tr> <td width="100%" align="center" colspan="3"> - <input type="submit" name="action" value="create_folder" accesskey="o"> - <input type="submit" name="action" value="delete" accesskey="d"> - <input type="submit" name="action" value="rename" accesskey="r"> - <input type="submit" name="action" value="upload" accesskey="u"> + + <input type="hidden" name="action"> + + <a href="javascript:{document.browse.action.value='create_folder';document.browse.submit();}"><img src="<TMPL_VAR NAME=IMAGE_DIR>/create_folder.png" alt="Create Folder" title="Create Folder" border="0"></a> + <a href="javascript:{document.browse.action.value='delete';document.browse.submit();}"><img src="<TMPL_VAR NAME=IMAGE_DIR>/delete.png" alt="Delete" title="Delete" border="0"></a> + <a href="javascript:{document.browse.action.value='rename';document.browse.submit();}"><img src="<TMPL_VAR NAME=IMAGE_DIR>/rename.png" alt="Rename" title="Rename" border="0"></a> + <a href="javascript:{document.browse.action.value='upload';document.browse.submit();}"><img src="<TMPL_VAR NAME=IMAGE_DIR>/upload.png" alt="Upload" title="Upload" border="0"></a> | <select name="vcs_command"> @@ -21,5 +24,5 @@ </select> - <input type="submit" name="action" value="vcs"> + <a href="javascript:{document.browse.action.value='vcs';document.browse.submit();}"><img src="<TMPL_VAR NAME=IMAGE_DIR>/go.png" alt="Go" title="Go" border="0"></a> </td> </tr> Index: vcs.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/vcs.html,v retrieving revision 1.4 retrieving revision 1.5 diff -U2 -r1.4 -r1.5 --- vcs.html 6 Nov 2002 05:34:42 -0000 1.4 +++ vcs.html 6 Jan 2003 00:35:16 -0000 1.5 @@ -17,5 +17,5 @@ <input type="hidden" name="vcs_command" value="<TMPL_VAR NAME=VCS_COMMAND>"> <input type="hidden" name="vcs_message" value="<TMPL_VAR NAME=VCS_MESSAGE>"> - <input name="Submit" value="1" type="submit" value="Ok"> + <input name="Submit" value="1" type="submit" value="Done"> </form> </center> |
From: Rob H. <for...@us...> - 2003-01-06 00:30:01
|
Update of /cvsroot/sandweb/sandweb/images In directory sc8-pr-cvs1:/tmp/cvs-serv2069 Added Files: go.xcf go.png Log Message: simple "go" button --- NEW FILE --- gimp xcf file ÿú'ÿÉ ÿö6ÿÿÉ ÿöDàÿÿÉ ÿòSÆàÿÿÉ ÿSûG;0$ ÿôþýüûúðéÉ þùöõÔ ÿú'ÿÉ ÿö6ÿÿÉ ÿöDàÿÿÉ ÿòSÆàÿÿÉ ÿSûG;0$ ÿôýú÷õòçß¾ ÿõ'ÿÉ ÿö6ÿÿÉ ÿöDàÿÿÉ ÿòSÆàÿÿÉ ÿSûG;0$ ÿôüøôðëßÖµ w) v) v) --- NEW FILE --- PNG R$88 ÔM£(-ÅQpxvYïÎþpÖvòF¶gfwæ}çÍ7o< 4,Jo@ñÄ p¸R.¨Àr©4\æ0K÷c ¼ËÇIYp ø '5´z ´·9yùrÛ«'³³³í©©©mÙ¡7!°=ö,uææç=§Ñ2øé;ß9dÚ|`²¯&Zg©óÉíÛ^ËåöÓéôW¶ì"þµÀ/iöðYÞ¥®¥ìÝ«W¿7iÀØúâÞ½:äg÷Á?¬¶ÀM{NËÄN¡PøÁ¤¿àÖó,/µÎËzY@E÷ê§hÉ68kA^çôôô7¹\nߤ ®p1×ÔÈdî«"BiÚlÐÛ³×÷øÿȺÁN¯ÒÓ$¥UúJµ(µÕA÷ E¬®«ÐÐÚ,È:Xñ«iïQÁÕ:ÉÆ{8ZIê§Ãê¬°ß q ^tÇ Ëm¨vê2 ÒDu<®9MCÞ-5d$´>ìñã¸;7.»qã¸;7|ù~þ9*ðCÑoG ¦¥ð`FÀØ ÞµðàNÀ¸^² ØW#.vWËÆíÂÂ!BÆ.Bæ¤Ìl#nTª}û¸_|ùPÝÎq¾®Îþü¹R.7ÕH?mÎÑåi°ýWÿ<^ÿ¡g4Øÿð¸ |
From: Nick J. <nje...@us...> - 2003-01-05 22:20:00
|
Update of /cvsroot/sandweb/sandweb/bin In directory sc8-pr-cvs1:/tmp/cvs-serv26134 Modified Files: sandweb.cgi Log Message: added some debugging messages, and some parsing fixes. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.335 retrieving revision 1.336 diff -U2 -r1.335 -r1.336 --- sandweb.cgi 4 Jan 2003 23:10:57 -0000 1.335 +++ sandweb.cgi 5 Jan 2003 22:19:58 -0000 1.336 @@ -154,5 +154,5 @@ my $main_window_url = $cgi->param('main_window_url') || ''; - $log->debug("action: $action submit: $submit"); + $log->debug("action: $action - submit: $submit"); $log->debug("module_description: $module_description\n"); @@ -974,9 +974,9 @@ # verify repository name foreach my $repo (@repos) { - if ($repository_selected eq $repo) { - $repo_name = $repo; - $valid = 1; + if ($repository_selected eq $repo) { + $repo_name = $repo; + $valid = 1; + } } - } if (!$valid) { # bad repository name @@ -2802,4 +2802,7 @@ 'location' => $config->{'paths'}->{'users_dir'} . "/" . $auth->get_username(), ); + + $log->debug("creating " . $config->{'paths'}->{'users_dir'} . "/" . $auth->get_username() . "/" . $repo_name); + if (! -d $config->{'paths'}->{'users_dir'} . "/" . $auth->get_username() . "/" . $repo_name ) { if (!$file->create_folder()) { |
From: Nick J. <nje...@us...> - 2003-01-05 22:18:35
|
Update of /cvsroot/sandweb/sandweb/tools In directory sc8-pr-cvs1:/tmp/cvs-serv25339 Modified Files: install_script.pl instcachedir.pl Log Message: added some error checking in install scripts to help with permissions problems, and stuff. Index: install_script.pl =================================================================== RCS file: /cvsroot/sandweb/sandweb/tools/install_script.pl,v retrieving revision 1.17 retrieving revision 1.18 diff -U2 -r1.17 -r1.18 --- install_script.pl 23 Apr 2002 07:17:40 -0000 1.17 +++ install_script.pl 5 Jan 2003 22:18:32 -0000 1.18 @@ -14,7 +14,7 @@ "cachedir = $config::cachedir\n". "logdir = $config::logdir\n". - "httpuser = $config::httpuser\n"; - "expectbin = $config::expectbin\n"; - "cvs_bin = $config::cvs_bin\n"; + "httpuser = $config::httpuser\n". + "expectbin = $config::expectbin\n". + "cvs_bin = $config::cvs_bin\n". "ssh_bin = $config::ssh_bin\n"; @@ -39,4 +39,8 @@ $bindir = instbin($bindir, 'sandweb-admin'); $bindir = instbin($bindir, 'sandweb-expect'); + +# errors +my @errors = (); + exit(2) if (!$bindir); @@ -86,12 +90,13 @@ # Cache directory -my @return = instcachedir($cachedir, $httpuser); +my @return = instcachedir($cachedir, $httpuser, \@errors); if (@return) { ($cachedir, $httpuser) = @return; -} else { exit(5); } + @errors = @{$return[2]}; +} else { print "function instcachedir() failed\n"; exit(5); } # create log dir print "Creating SandWeb log file : $logdir/sandweb.log\n"; -system('tools/mkdirto.pl', '755', '0:0', $logdir); +system('tools/mkdirto.pl', '755', $logdir); my $httpuser_uid = &getuid($httpuser); system("touch", "$logdir/sandweb.log"); @@ -100,5 +105,5 @@ # install config file print "Installing SandWeb config file in $cfgdir\n"; -system('tools/mkdirto.pl', '755', '0:0', $cfgdir); +system('tools/mkdirto.pl', '755', $cfgdir); system('cp', 'etc/sandweb.cfg', "$cfgdir/sandweb.cfg"); system('cp', 'etc/repository.cfg', "$cfgdir/repository.cfg"); @@ -138,5 +143,5 @@ chown($httpuser_uid, 0, "$bindir/sandweb-admin"); # setguid for sandweb-admin - system("chmod", "u=rwxs,g=rx,o=", "$bindir/sandweb-admin"); + system("chmod", "u=rwx,g=rx,o=rx", "$bindir/sandweb-admin"); } else { print "unable to locate $bindir/sandweb-admin\n"; @@ -179,4 +184,16 @@ print "Installation complete!\n"; print "----------------------\n"; + +if (@errors) { + print "\n"; + print "----------------------------------\n"; + print "The following errors have occured:\n"; + print "----------------------------------\n"; + foreach my $error (@errors) { + print " * $error\n"; + } + print "\n"; +} + exit(0); @@ -187,4 +204,5 @@ open (PW, "</etc/passwd") or die "Unable to read password file\n"; foreach my $line (<PW>) { + next if ($line =~ /^\s*$/); if ($line =~ /^$user\:/) { ($junk, $junk2, $uid, $junk3) = split(':', $line, 4); Index: instcachedir.pl =================================================================== RCS file: /cvsroot/sandweb/sandweb/tools/instcachedir.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -U2 -r1.6 -r1.7 --- instcachedir.pl 28 Mar 2002 06:09:12 -0000 1.6 +++ instcachedir.pl 5 Jan 2003 22:18:32 -0000 1.7 @@ -7,4 +7,5 @@ return(0) if ((!$_[0]) && (!$_[1])); my ($cachedir, $httpuser) = @_; + my @errors = @{$_[2]}; my $verified = 0; @@ -38,17 +39,17 @@ if (system('tools/mkdirto.pl', '755', $httpuser . ':0', "$cachedir")) { - return(0); + push @errors, "Failed to set $cachedir read/write for $httpuser user."; } print("Creating SandWeb cache/data dir '$cachedir/data'...\n"); if (system('tools/mkdirto.pl', '750', $httpuser . ':0', "$cachedir/data")) { - return(0); + push @errors, "Failed to set $cachedir/data read/write for $httpuser user."; } print("Creating SandWeb cache/users dir '$cachedir/users'...\n"); if (system('tools/mkdirto.pl', '750', $httpuser . ':0', "$cachedir/users")) { - return(0); + push @errors, "Failed to set $cachedir/users read/write for $httpuser user."; } - return($cachedir, $httpuser); + return($cachedir, $httpuser, \@errors); } 1; |
From: Rob H. <for...@us...> - 2003-01-05 21:37:55
|
Update of /cvsroot/sandweb/sandweb/templates In directory sc8-pr-cvs1:/tmp/cvs-serv13586 Modified Files: submitform.js Log Message: uncommenting submit subroutine, just not calling it from doSubmit Index: submitform.js =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/submitform.js,v retrieving revision 1.3 retrieving revision 1.4 diff -U2 -r1.3 -r1.4 --- submitform.js 5 Jan 2003 21:33:37 -0000 1.3 +++ submitform.js 5 Jan 2003 21:37:52 -0000 1.4 @@ -1,4 +1,4 @@ function submitForm(clicked) { - //document.repository.submit(); + document.repository.submit(); } @@ -9,7 +9,7 @@ } - if (submitOk) { - submitForm(clicked); - } +// if (submitOk) { +// submitForm(clicked); +// } } |
From: Rob H. <for...@us...> - 2003-01-05 21:33:40
|
Update of /cvsroot/sandweb/sandweb/templates In directory sc8-pr-cvs1:/tmp/cvs-serv12340 Modified Files: submitform.js Log Message: we don't need to do document.repository.submit() here, pressing the submit input button in the repository.html does that for us. Index: submitform.js =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/submitform.js,v retrieving revision 1.2 retrieving revision 1.3 diff -U2 -r1.2 -r1.3 --- submitform.js 4 Jan 2003 22:55:41 -0000 1.2 +++ submitform.js 5 Jan 2003 21:33:37 -0000 1.3 @@ -1,4 +1,4 @@ function submitForm(clicked) { - document.repository.submit(); + //document.repository.submit(); } |
From: Nick J. <nje...@us...> - 2003-01-05 20:59:08
|
Update of /cvsroot/sandweb/sandweb/templates In directory sc8-pr-cvs1:/tmp/cvs-serv977/templates Modified Files: sandbox.html Log Message: * vertically aligned table layout to make things line up evenly Index: sandbox.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/sandbox.html,v retrieving revision 1.22 retrieving revision 1.23 diff -U2 -r1.22 -r1.23 --- sandbox.html 16 Sep 2002 05:06:48 -0000 1.22 +++ sandbox.html 5 Jan 2003 20:59:05 -0000 1.23 @@ -23,11 +23,11 @@ <input type="hidden" name="action" value="sandbox"> <tr> - <td width="20%" align="left"> + <td width="20%" align="left" valign="center"> <input type="text" name="module_name" size="15" maxlength="30"> </td> - <td width="40%" align="left"> + <td width="40%" align="left" valign="center"> <input type="text" name="module_description" size="30" maxlength="45"> </td> - <td width="25%" align="center"> + <td width="25%" align="center" valign="center"> <select size="1" name="repo_name"> <TMPL_LOOP NAME="REPO_LIST"> @@ -36,5 +36,5 @@ </select> </td> - <td width="15%" align="center"> + <td width="15%" align="center" valign="center"> <input type="submit" name="Submit" value="Checkout"> </td> @@ -56,14 +56,14 @@ <TMPL_LOOP NAME="MODULE_LOOP"> <tr> - <td width="20%" align="left"> + <td width="20%" align="left" valign="center"> <a href="<TMPL_VAR NAME=PROGNAME>?action=browse_module&repo_name=<TMPL_VAR NAME=REPO_NAME>&module_name=<TMPL_VAR NAME="MODULE_NAME">"><TMPL_VAR NAME="MODULE_NAME"></a> </td> - <td width="40%" align="left"> + <td width="40%" align="left" valign="center"> <TMPL_VAR NAME="MODULE_DESC"> </td> - <td width="25%" align="center"> + <td width="25%" align="center" valign="center"> <TMPL_VAR NAME="REPOSITORY"> </td> - <td width="15%" align="center"> + <td width="15%" align="center" valign="center"> <font size="2"> <a href="javascript:onClick=myOpenWindow();javascript:document.sandbox.module_name.value='<TMPL_VAR NAME=MODULE_NAME>';javascript:document.sandbox.repo_name.value='<TMPL_VAR NAME=REPO_NAME>';javascript:document.sandbox.submit();">update</a> |
From: Rob H. <for...@us...> - 2003-01-05 08:59:11
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Auth In directory sc8-pr-cvs1:/tmp/cvs-serv15829/SandWeb/Auth Modified Files: FlatFile.pm Log Message: beginning of POD docs Index: FlatFile.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Auth/FlatFile.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -U2 -r1.7 -r1.8 --- FlatFile.pm 19 Jun 2002 07:08:59 -0000 1.7 +++ FlatFile.pm 5 Jan 2003 08:59:08 -0000 1.8 @@ -1,7 +1,15 @@ # SandWeb FlatFile authentication module # -# This class verifies MD5 passwords for a given username, and returns -# true if the user if authentic, false if not. -# + +=pod +=head1 + +SandWeb::Auth::FlatFile + +This class verifies MD5 passwords for a given username, and returns +true if the user if authentic, false if not. + +=cut + # SandWeb (Web-based VCS client) # @@ -24,8 +32,30 @@ # +=head1 + +part of the SandWeb::Auth::FlatFile package + +=cut + package SandWeb::Auth::FlatFile; +=head1 + +uses Digest::MD5 + +=cut + use Digest::MD5 qw(md5_hex); +=head1 + +Methods + +new + + instantiates a new object + +=cut + sub new { my $class = shift; @@ -39,4 +69,12 @@ return $self; } + +=head1 + +verify_password + + compares a given password to the one stored + +=cut sub verify_password { |
From: Rob H. <for...@us...> - 2003-01-05 08:59:11
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory sc8-pr-cvs1:/tmp/cvs-serv15829/SandWeb/Repository Modified Files: cvs.pm Log Message: beginning of POD docs Index: cvs.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/cvs.pm,v retrieving revision 1.34 retrieving revision 1.35 diff -U2 -r1.34 -r1.35 --- cvs.pm 7 Nov 2002 08:01:09 -0000 1.34 +++ cvs.pm 5 Jan 2003 08:59:08 -0000 1.35 @@ -1,7 +1,15 @@ #lib/SandWeb/Repository/cvs.pm # -#This class directly interfaces with the CVS version control system. It can -#translate calls from Repository into command-line flags that CVS can use. -# + +=pod +=head1 + +SandWeb::Repository::cvs + +This class directly interfaces with the CVS version control system. It can +translate calls from Repository into command-line flags that CVS can use. + +=cut + # SandWeb (Web-based VCS client) # @@ -24,5 +32,17 @@ # +=head1 + +part of the SandWeb::Repository::cvs package + +=cut + package SandWeb::Repository::cvs; + +=head1 + +uses SandWeb::Diff, SandWeb::Shell, SandWeb::Security + +=cut use SandWeb::Diff; |
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory sc8-pr-cvs1:/tmp/cvs-serv15829/SandWeb Modified Files: Auth.pm Browse.pm Config.pm Diff.pm File.pm Log.pm Repository.pm Security.pm Shell.pm UI.pm Log Message: beginning of POD docs Index: Auth.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Auth.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -U2 -r1.22 -r1.23 --- Auth.pm 19 Jun 2002 07:08:59 -0000 1.22 +++ Auth.pm 5 Jan 2003 08:59:07 -0000 1.23 @@ -1,7 +1,15 @@ #lib/SandWeb/Auth.pm # -#This class handles logins using modules. A module will return true if the user -#is authentic, false if not. -# + +=pod +=head1 + +SandWeb::Auth + +This class handles logins using modules. A module will return true if the user +is authentic, false if not. + +=cut + # SandWeb (Web-based VCS client) # Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.79 retrieving revision 1.80 diff -U2 -r1.79 -r1.80 --- Browse.pm 26 Aug 2002 06:59:47 -0000 1.79 +++ Browse.pm 5 Jan 2003 08:59:07 -0000 1.80 @@ -1,12 +1,21 @@ #lib/SandWeb/Browse.pm # -#This class handles all filesystem and sandbox browsing functionality. It -#can show the user a list of files, allow the user to perform abitrary -#actions on any number of files, and allows you to view the contents of -#specific files. -# -#All filesystem and VCS operations are handled through a generic tool_bar, -#which is displayed in the UI. All UI is handled through the SandWeb::UI -#class. + +=pod +=head1 + +SandWeb::Browse + +This class handles all filesystem and sandbox browsing functionality. It +can show the user a list of files, allow the user to perform abitrary +actions on any number of files, and allows you to view the contents of +specific files. + +All filesystem and VCS operations are handled through a generic tool_bar, +which is displayed in the UI. All UI is handled through the SandWeb::UI +class. + +=cut + # # SandWeb (Web-based VCS client) Index: Config.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Config.pm,v retrieving revision 1.32 retrieving revision 1.33 diff -U2 -r1.32 -r1.33 --- Config.pm 6 Nov 2002 05:17:22 -0000 1.32 +++ Config.pm 5 Jan 2003 08:59:07 -0000 1.33 @@ -1,7 +1,15 @@ # Config class for SandWeb # -# This class just load in the XML config file, blesses it, and returns the -# object reference. Simply a Config loading class. -# + +=pod +=head1 + +SandWeb::Config + +This class just loads in the XML config file, blesses it, and returns the +object reference. Simply a Config loading class. + +=cut + # # SandWeb (Web-based VCS client) @@ -25,8 +33,29 @@ # +=head1 + +part of the SandWeb::Config package + +=cut + package SandWeb::Config; +=head1 + +uses XML::Simple + +=cut + use XML::Simple; +=head1 + +Methods + +new + instantiates a new object + +=cut + sub new { my $class = shift; @@ -80,7 +109,14 @@ } +=head1 + +manage_data_structure + + make sure data structure containing repositories is consistent + +=cut + sub manage_data_structure { my $self = shift; - # make sure data structure containing repositories is consistent if ( ($self->{'repo'}->{'type'}) && (ref(\$self->{'repo'}->{'type'}) eq 'SCALAR')) { @@ -111,5 +147,12 @@ # -# returns users full name +=head1 + +get_full_name + + returns users full name + +=cut + sub get_full_name { my $self = shift; @@ -117,5 +160,12 @@ } -# returns whether user wants to confirm each file deletion +=head1 + +get_confirm_delete + + returns whether user wants to confirm each file deletion + +=cut + sub get_confirm_delete { my $self = shift; @@ -129,5 +179,12 @@ # -# write config file for user preferences +=head1 + +write_preferences_config + + write config file for user preferences + +=cut + sub write_preferences_config { my $self = shift; @@ -150,6 +207,11 @@ } +=head1 + +get_repo_list + + returns list of subscribed repositories +=cut -# returns list of subscribed repositories sub get_repo_list { my $self = shift; @@ -157,8 +219,14 @@ } -# returns true if repository exists, 0 if not. -# -# repo = name of repository to check for -# +=head1 + +repository_exists + + returns true if repository exists, 0 if not. + + repo = name of repository to check for + +=cut + sub repository_exists { my $self = shift; @@ -175,5 +243,12 @@ } -# create new repository +=head1 + +create_repo + + create new repository + +=cut + sub create_repo { my $self = shift; @@ -203,5 +278,12 @@ } -# update existing repository +=head1 + +update_repo + + update existing repository + +=cut + sub update_repo { my $self = shift; @@ -230,5 +312,12 @@ } -# delete existing repository +=head + +delete_repo + + delete existing repository + +=cut + sub delete_repo { my $self = shift; @@ -238,5 +327,11 @@ } -# get/set repo_server +=head + +get_repo_server + + get repository servername +=cut + sub get_repo_server { my $self = shift; @@ -249,4 +344,12 @@ } } + +=head + +set_repo_server + + set repository servername +=cut + sub set_repo_server { my $self = shift; @@ -261,5 +364,12 @@ } } -# get/set repo_username + +=head + +get_repo_username + + get repository username +=cut + sub get_repo_username { my $self = shift; @@ -272,4 +382,12 @@ } } + +=head + +set_repo_server + + set repository username +=cut + sub set_repo_username { my $self = shift; @@ -284,5 +402,13 @@ } } -# get/set repo_password + +=head1 + +get_repo_password + + get repository password + +=cut + sub get_repo_password { my $self = shift; @@ -295,4 +421,13 @@ } } + +=head1 + +set_repo_password + + set repository password + +=cut + sub set_repo_password { my $self = shift; @@ -307,5 +442,13 @@ } } -# get/set whether we should remember repo password + +=head1 + +get_rememer_repo_password + + get whether we should remember repo password + +=cut + sub get_remember_repo_password { my $self = shift; @@ -318,4 +461,13 @@ } } + +=head1 + +set_rememer_repo_password + + set whether we should remember repo password + +=cut + sub set_remember_repo_password { my $self = shift; @@ -330,5 +482,13 @@ } } -# get/set repo_connection + +=head1 + +get_repo_connection + + get the type of repository connection ( ssh,local,pserver,etc ) + +=cut + sub get_repo_connection { my $self = shift; @@ -341,4 +501,13 @@ } } + +=head1 + +set_repo_connection + + set the type of repository connection ( ssh,local,pserver,etc ) + +=cut + sub set_repo_connection { my $self = shift; @@ -353,5 +522,13 @@ } } -# get/set repo_type + +=head1 + +get_repo_type + + set the type of repository ( cvs,svn,rsh,etc ) + +=cut + sub get_repo_type { my $self = shift; @@ -364,4 +541,13 @@ } } + +=head1 + +set_repo_type + + set the type of repository ( cvs,svn,rsh,etc ) + +=cut + sub set_repo_type { my $self = shift; @@ -376,5 +562,13 @@ } } -# get/set repo_root + +=head1 + +get_repo_root + + get the root of the repository + +=cut + sub get_repo_root { my $self = shift; @@ -387,4 +581,13 @@ } } + +=head1 + +set_repo_root + + set the root of the repository + +=cut + sub set_repo_root { my $self = shift; @@ -410,9 +613,15 @@ -# returns list of subscribed modules -# args: -# -# repo = name of repository to get list of subscribed modules. -# +=head1 + +get_module_list + + returns list of subscribed modules + + args: + repo = name of repository to get list of subscribed modules. + +=cut + sub get_module_list { my $self = shift; @@ -426,8 +635,14 @@ -# returns true if module exists, 0 if not. -# -# module = name of module to check for -# +=head1 + +module_exists + + returns true if module exists, 0 if not. + + module = name of module to check for + +=cut + sub module_exists { my $self = shift; @@ -445,4 +660,12 @@ } +=head1 + +add_module + + adds a module to the config file + +=cut + sub add_module { my $self = shift; @@ -472,4 +695,12 @@ } +=head1 + +update_module + + updates information on a module + +=cut + sub update_module { my $self = shift; @@ -492,4 +723,12 @@ } +=head1 + +delete_module + + deletes a module + +=cut + sub delete_module { my $self = shift; @@ -501,4 +740,12 @@ delete $self->{'repo'}->{$repo}->{'module'}->{$module}; } + +=head1 + +get_module_description + + gets the description of a stored module + +=cut sub get_module_description { Index: Diff.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Diff.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -U2 -r1.9 -r1.10 --- Diff.pm 5 Sep 2002 02:07:53 -0000 1.9 +++ Diff.pm 5 Jan 2003 08:59:07 -0000 1.10 @@ -1,10 +1,17 @@ #SandWeb Diff Class # -#This class will eventually implement "diff" functionality for SandWeb. This -#will give us VCS-independant formatting of diffs, and will also give us the -#ability to do nicely-formatted, side-by-side colorized diffs. -# -#At the moment, all this class does is colorize any "unified format" diff -#given to it. +=pod + +SandWed::Diff + +This class will eventually implement "diff" functionality for SandWeb. This +will give us VCS-independant formatting of diffs, and will also give us the +ability to do nicely-formatted, side-by-side colorized diffs. + +At the moment, all this class does is colorize any "unified format" diff +given to it. + +=cut + # # SandWeb (Web-based VCS client) @@ -28,6 +35,23 @@ # +=head1 + +part of the SandWeb::Diff package + +=cut + package SandWeb::Diff; +=head1 + +Modules + + +new + + instantiates a new object + +=cut + sub new { my $class = shift; @@ -42,4 +66,11 @@ return $self; } + +=head1 + +colored_diff + returns an HTML-colorized output of the difference between two files + +=cut sub colored_diff { Index: File.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/File.pm,v retrieving revision 1.60 retrieving revision 1.61 diff -U2 -r1.60 -r1.61 --- File.pm 13 Aug 2002 23:19:27 -0000 1.60 +++ File.pm 5 Jan 2003 08:59:07 -0000 1.61 @@ -1,8 +1,17 @@ #lib/SandWeb/File.pm # -#This class handles all file viewing and operations. If any class wants -#to view the contents of a file or directory, or perform a file action -#such as delete, rename, create, etc. then it just needs to create a File -#object and call the appropriate File method. + +=pod +=head1 + +SandWeb::File + +This class handles all file viewing and operations. If any class wants +to view the contents of a file or directory, or perform a file action +such as delete, rename, create, etc. then it just needs to create a File +object and call the appropriate File method. + +=cut + # # SandWeb (Web-based VCS client) @@ -26,9 +35,32 @@ # +=head1 + +part of the SandWeb::File class + +=cut + package SandWeb::File; +=head1 + +uses SandWeb::File::Unix + +=cut + # file handling module(s) use SandWeb::File::Unix; +=head1 + +Modules + + +new + + instantiates a new object + +=cut + sub new { my $class = shift; @@ -61,4 +93,12 @@ } +=head1 + +get_owner + + returns the owner of the current file + +=cut + sub get_owner { my $self = shift; @@ -66,4 +106,12 @@ } +=head1 + +get_group + + returns the group ownership of the current file + +=cut + sub get_group { my $self = shift; @@ -71,4 +119,12 @@ } +=head1 + +get_filename + + returns the name of the current file + +=cut + sub get_filename { my $self = shift; @@ -76,4 +132,12 @@ } +=head1 + +get_location + + returns the location (directory) of the current file + +=cut + sub get_location { my $self = shift; @@ -81,4 +145,12 @@ } +=head1 + +get_permissions + + returns the permissions of the current file + +=cut + sub get_permissions { my $self = shift; @@ -86,4 +158,12 @@ } +=head1 + +get_file_type + + returns the type of the current file + +=cut + sub get_file_type { my $self = shift; @@ -103,4 +183,12 @@ } +=head1 + +get_mime_type + + returns the mime type of the current file + +=cut + sub get_mime_type { my $self = shift; @@ -124,4 +212,12 @@ } +=head1 + +get_size + + returns the size of the current file + +=cut + sub get_size { my $self = shift; @@ -129,4 +225,12 @@ } +=head1 + +get_age + + returns the age of the current file + +=cut + sub get_age { my $self = shift; @@ -134,4 +238,12 @@ } +=head1 + +upload + + receives an upload of the current file + +=cut + sub upload { my $self = shift; @@ -153,4 +265,12 @@ } +=head1 + +download + + sends the current file ( for downloading ) + +=cut + sub download { my $self = shift; @@ -170,4 +290,12 @@ } +=head1 + +exists + + returns a 1 if the file exists, 0 if not + +=cut + sub exists { my $self = shift; @@ -185,4 +313,12 @@ } +=head1 + +create_file + + creates a file at the current location with the current filename + +=cut + sub create_file { my $self = shift; @@ -203,4 +339,12 @@ } +=head1 + +create_folder + + creates a folder at the current location with the current filename + +=cut + sub create_folder { my $self = shift; @@ -219,4 +363,12 @@ } +=head1 + +delete + + deletes the current file + +=cut + sub delete { my $self = shift; @@ -236,4 +388,12 @@ } +=head1 + +delete_folder + + deletes the current folder + +=cut + sub delete_folder { my $self = shift; @@ -255,4 +415,12 @@ } +=head1 + +copy + + copies the current file + +=cut + sub copy { my $self = shift; @@ -273,4 +441,12 @@ } +=head1 + +rename + + renames the current file + +=cut + sub rename { my $self = shift; @@ -291,4 +467,12 @@ } +=head1 + +file_read + + returns the contents of the current file + +=cut + sub file_read { my $self = shift; @@ -307,4 +491,12 @@ } +=head1 + +file_write + + writes out contents to the current file + +=cut + sub file_write { my $self = shift; @@ -324,4 +516,12 @@ return $module->file_write(contents => $contents); } + +=head1 + +get_file_commands + + returns all commands that this object supports + +=cut sub get_file_commands { Index: Log.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Log.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -U2 -r1.12 -r1.13 --- Log.pm 19 Jun 2002 07:12:52 -0000 1.12 +++ Log.pm 5 Jan 2003 08:59:07 -0000 1.13 @@ -1,6 +1,12 @@ # SandWeb logging facility # -# This class allows us to have a standardized method for logging and debugging. -# + +=pod +=head1 + +This class allows us to have a standardized method for logging and debugging. + +=cut + # SandWeb (Web-based VCS client) # @@ -23,6 +29,23 @@ # +=head1 + +part of the SandWeb::Log package + +=cut + package SandWeb::Log; +=head1 + +Methods + + +new + + instantiates a new object + +=cut + sub new { my $class = shift; @@ -41,4 +64,12 @@ } +=head1 + +standard + + logs with "standard" severity + +=cut + sub standard { my ($self, $msg) = @_; @@ -49,4 +80,12 @@ } +=head1 + +debug + + logs with "debug" severity + +=cut + sub debug { my ($self, $msg) = @_; @@ -64,4 +103,12 @@ } +=head1 + +error + + logs with "error" severity + +=cut + sub error { my ($self, $msg) = @_; @@ -71,4 +118,12 @@ return 1; } + +=head1 + +get_debug_msgs + + returns the debug messages + +=cut sub get_debug_msgs { Index: Repository.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository.pm,v retrieving revision 1.47 retrieving revision 1.48 diff -U2 -r1.47 -r1.48 --- Repository.pm 7 Nov 2002 08:01:06 -0000 1.47 +++ Repository.pm 5 Jan 2003 08:59:07 -0000 1.48 @@ -1,8 +1,17 @@ #lib/SandWeb/Repository.pm # -#This class abstracts VCS functionality. It takes high-level VCS operations, -#and decides what method(s) to call in it's VCS-specific subclasses ( such -#as SandWeb::Repository::cvs ). It is up to the subclass to translate the -#high-level commands into something each VCS can use directly. + +=pod +=head1 + +SandWeb::Repository + +This class abstracts VCS functionality. It takes high-level VCS operations, +and decides what method(s) to call in it's VCS-specific subclasses ( such +as SandWeb::Repository::cvs ). It is up to the subclass to translate the +high-level commands into something each VCS can use directly. + +=cut + # # SandWeb (Web-based VCS client) @@ -26,6 +35,30 @@ # +=head1 + +part of the SandWeb::Repository package + +=cut + package SandWeb::Repository; + +=head1 + +uses SandWeb::Repository::cvs + +=cut + use SandWeb::Repository::cvs; + +=head1 + +Methods + + +new + + instantiates a new object + +=cut sub new { Index: Security.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Security.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- Security.pm 26 Aug 2002 06:59:47 -0000 1.1 +++ Security.pm 5 Jan 2003 08:59:07 -0000 1.2 @@ -1,5 +1,15 @@ #lib/SandWeb/Security.pm # -# This class has methods to handle common perl/cgi security problems. + +=pod +=head1 + +SandWeb::Security + +This class has methods to handle common perl/cgi security problems. + + +=cut + # # SandWeb (Web-based VCS client) @@ -23,6 +33,20 @@ # +=head1 + +part of the SandWeb::Security package + +=cut + package SandWeb::Security; +=head1 + +new + + instantiates a new object + +=cut + sub new { my $class = shift; @@ -32,4 +56,12 @@ } +=head1 + +path + + looks for and corrects common security problems with Unix directories + +=cut + sub path { my $self = shift; @@ -47,4 +79,13 @@ return $filename; } + +=head1 + +shell + + looks for and corrects common security problems with + calling to the Unix shell + +=cut sub shell { Index: Shell.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Shell.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -U2 -r1.22 -r1.23 --- Shell.pm 31 Dec 2002 06:31:12 -0000 1.22 +++ Shell.pm 5 Jan 2003 08:59:07 -0000 1.23 @@ -1,8 +1,17 @@ #lib/SandWeb/Shell # -#This class makes any and all calls to the operating system shell. It has -#one public method, execute, which takes a command parameter. Shell is -#capable of understand SandWeb-specific needs, such as running a command -#as a specific Unix user, or authenticating to a VCS system like CVS. + +=pod +=head1 + +SandWeb::Shell + +This class makes any and all calls to the operating system shell. It has +one public method, execute, which takes a command parameter. Shell is +capable of understand SandWeb-specific needs, such as running a command +as a specific Unix user, or authenticating to a VCS system like CVS. + +=cut + # # SandWeb (Web-based VCS client) @@ -26,6 +35,18 @@ # +=head1 + +part of the SandWeb::Shell package + +=cut + package SandWeb::Shell; +=head1 + +uses SandWeb::File + +=cut + use SandWeb::File; @@ -37,4 +58,15 @@ my $timeout = '300'; +=head + +Methods + + +new + + instantiates a new object + +=cut + sub new { my $class = shift; @@ -88,4 +120,12 @@ } +=head1 + +execute + + executes a given command + +=cut + sub execute { my $self = shift; @@ -262,4 +302,12 @@ return %return; } + +=head1 + +pipe + + opens a pipe to a file + +=cut sub pipe { Index: UI.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/UI.pm,v retrieving revision 1.37 retrieving revision 1.38 diff -U2 -r1.37 -r1.38 --- UI.pm 13 Aug 2002 03:22:02 -0000 1.37 +++ UI.pm 5 Jan 2003 08:59:07 -0000 1.38 @@ -1,5 +1,12 @@ # SandWeb User Interface Class # -# This class is currently a front-end to our templating system, HTML::Template + +=pod +=head1 + +This class is currently a front-end to our templating system + +=cut + # # SandWeb (Web-based VCS client) @@ -23,8 +30,33 @@ # +=head1 + +part of the SandWeb::UI package + +=cut + package SandWeb::UI; + +=head1 + +uses HTML::Template + +=cut + use HTML::Template; + +=head1 + +Methods + + +new + + instantiates a new object + +=cut + sub new { my $class = shift; @@ -42,4 +74,12 @@ } +=head1 + +print_screen + + prints out HTML + +=cut + sub print_screen { my $self = shift; @@ -85,4 +125,12 @@ } +=head1 + +print_popup + + prints an HTML "pop-up" window + +=cut + sub print_popup { my $self = shift; @@ -124,4 +172,12 @@ } +=head1 + +get_menu_bar + + gets the "menu bar" part of the HTML page + +=cut + sub get_menu_bar { my $self = shift; @@ -142,4 +198,11 @@ } +=head1 + +get_menu + + get the "menu" part of the HTML template + +=cut sub get_menu { @@ -159,4 +222,12 @@ return join('', @contents); } + +=head1 + +get_javascript + + gets javascript content for the HTML template (if any) + +=cut sub get_javascript { |
From: Rob H. <for...@us...> - 2003-01-05 08:59:11
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/File In directory sc8-pr-cvs1:/tmp/cvs-serv15829/SandWeb/File Modified Files: Unix.pm Log Message: beginning of POD docs Index: Unix.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/File/Unix.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -U2 -r1.6 -r1.7 --- Unix.pm 26 Aug 2002 06:59:47 -0000 1.6 +++ Unix.pm 5 Jan 2003 08:59:08 -0000 1.7 @@ -1,7 +1,15 @@ #lib/SandWeb/File/Unix.pm # -# This class handles all file viewing and operations on Unix systems. -# It is only intended to be called by the File class. -# + +=pod +=head1 + +SandWeb::File::Unix + +This class handles all file viewing and operations on Unix systems. +It is only intended to be called by the File class. + +=cut + # SandWeb (Web-based VCS client) # @@ -24,9 +32,32 @@ # +=head1 + +part of the SandWeb::File::Unix package + +=cut + package SandWeb::File::Unix; +=head1 + +uses SandWeb::Shell and SandWeb::Security + +=cut + use SandWeb::Shell; use SandWeb::Security; +=head1 + +Methods + + +new + + instantiates a new object + +=cut + sub new { my $class = shift; @@ -79,8 +110,23 @@ } +=head1 + +get_owner + + returns the owner of the current file + +=cut + sub get_owner { my $self = shift; return $self->{'owner'}; } +=head1 + +get_group + + returns the group of the current file + +=cut sub get_group { @@ -88,4 +134,11 @@ return $self->{'group'}; } +=head1 + +get_filename + + returns the filename of the current file + +=cut sub get_filename { @@ -94,4 +147,12 @@ } +=head1 + +get_location + + returns the location (directory) of the current file + +=cut + sub get_location { my $self = shift; @@ -99,8 +160,23 @@ } +=head1 + +get_permissions + + returns the permissions of the current file + +=cut + sub get_permissions { my $self = shift; return $self->{'perms'}; } +=head1 + +get_file_type + + returns the file_type of the current file + +=cut sub get_file_type { @@ -131,4 +207,11 @@ return $file_type; } +=head1 + +get_size + + returns the size of the current file + +=cut sub get_size { @@ -136,4 +219,11 @@ return $self->{'size'}; } +=head1 + +get_age + + returns the age of the current file + +=cut sub get_age { @@ -141,4 +231,11 @@ return $self->{'age'}; } +=head1 + +upload + + uploads ( receives ) a file from the user + +=cut sub upload { @@ -169,4 +266,11 @@ ); } +=head1 + +download + + downloads ( sends ) the file to the user + +=cut sub download { @@ -191,4 +295,11 @@ close FILE; } +=head1 + +exists + + returns 1 if the file exists, 0 if it does not + +=cut sub exists { @@ -217,4 +328,11 @@ return $return; } +=head1 + +create_file + + creates ( touches ) an empty file with the current filename + +=cut sub create_file { @@ -235,4 +353,11 @@ return $return; } +=head1 + +create_folder + + creates (mkdir) a new folder + +=cut sub create_folder { @@ -252,4 +377,11 @@ } +=head1 + +delete + + deletes ( rm ) the current file + +=cut sub delete { my $self = shift; @@ -274,4 +406,11 @@ } } +=head1 + +delete_folder + + deletes ( rm -rf ) the current folder + +=cut sub delete_folder { @@ -295,4 +434,11 @@ return 1; } +=head1 + +copy + + copy ( cp ) the current file/folder + +=cut sub copy { @@ -322,4 +468,11 @@ return 1; } +=head1 + +rename + + renames ( mv ) the current file + +=cut sub rename { @@ -340,4 +493,11 @@ return 1; } +=head1 + +file_read + + reads the contents of the current file + +=cut sub file_read { @@ -351,4 +511,11 @@ ); } +=head1 + +file_write + + writes contents out to file + +=cut sub file_write { @@ -370,4 +537,11 @@ return 1; } +=head1 + +get_file_commands + + returns the supported file commands + +=cut sub get_file_commands { |
From: Rob H. <for...@us...> - 2003-01-05 08:59:10
|
Update of /cvsroot/sandweb/sandweb/lib In directory sc8-pr-cvs1:/tmp/cvs-serv15829 Modified Files: SandWeb.pm Log Message: beginning of POD docs Index: SandWeb.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -U2 -r1.20 -r1.21 --- SandWeb.pm 27 Jul 2002 01:47:58 -0000 1.20 +++ SandWeb.pm 5 Jan 2003 08:59:07 -0000 1.21 @@ -1,7 +1,15 @@ # SandWeb main class # -#This class handles all the "bootstrapping" for SandWeb. It created the -#basic objects we always need on every run, like Log, Config, UI, and -#Auth. + +=pod +=head1 + +SandWeb.pm + +This class handles all the "bootstrapping" for SandWeb. It created the +basic objects we always need on every run, like Log, Config, UI, and +Auth. + +=cut # # SandWeb (Web-based VCS client) @@ -24,7 +32,25 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# + +=head1 + +Part of the SandWeb package + +=cut package SandWeb; +=head1 + +Depends on : + +SandWeb::Config +SandWeb::Log +SandWeb::UI +SandWeb::Auth + +=cut + use SandWeb::Config; use SandWeb::Log; @@ -32,4 +58,18 @@ use SandWeb::Auth; +=head1 + +Methods + +=cut + +=head1 + +get_version + + returns the current version of SandWeb + +=cut + $VERSION = 'BETA'; sub get_version { @@ -37,5 +77,14 @@ } -# initiates the config class, and creates the other objects with its data +=head1 + +start_up + + initiates the config class, and creates the other objects + with its data + + +=cut + sub start_up { my $class = shift; @@ -73,6 +122,12 @@ } -# all direct access to data should eventually be replaced with method calls -# to increase encapsulation. +=head1 + +load_log_object + + instantiates a log object and passes it to the application + +=cut + sub _load_log_object { my %args = @_; @@ -88,4 +143,12 @@ } +=head1 + +load_ui_object + + instantiates a UI object and passes it to the application + +=cut + sub _load_ui_object { my %args = @_; @@ -100,4 +163,12 @@ return $ui; } + +=head1 + +load_auth_object + + instantiates an auth object and passes it to the application + +=cut sub _load_auth_object { |
From: Rob H. <for...@us...> - 2003-01-05 05:12:12
|
Update of /cvsroot/sandweb/sandweb In directory sc8-pr-cvs1:/tmp/cvs-serv32586 Modified Files: MANIFEST Log Message: removing files that aren't used anymore Index: MANIFEST =================================================================== RCS file: /cvsroot/sandweb/sandweb/MANIFEST,v retrieving revision 1.14 retrieving revision 1.15 diff -U2 -r1.14 -r1.15 --- MANIFEST 26 Aug 2002 06:59:47 -0000 1.14 +++ MANIFEST 5 Jan 2003 05:12:08 -0000 1.15 @@ -16,5 +16,4 @@ lib/SandWeb/Browse.pm lib/SandWeb/Diff.pm -lib/SandWeb/ErrHndlr.pm lib/SandWeb/File.pm lib/SandWeb/File/Unix.pm @@ -63,5 +62,4 @@ doc/dependencies.list -doc/API/cvs.txt doc/API/File.txt doc/API/Repository.txt @@ -77,7 +75,4 @@ tools/change-entry.pl tools/install_script.pl - -doc/auth-spec.txt -doc/features.list t/var/data/passwd |
From: Rob H. <for...@us...> - 2003-01-04 23:11:00
|
Update of /cvsroot/sandweb/sandweb/bin In directory sc8-pr-cvs1:/tmp/cvs-serv5379/bin Modified Files: sandweb.cgi Log Message: fixed a bug with trunk switch/sync in tag_menu and branch_menu, I was passing the value of the submit button as a tag name, ( like the way we do it with input fields for tag/branch switch/sync ), when I should have just been doing "cvs update -A" ( -A is reset, you just set "reset => 1" in a Repository object to do this ). Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.334 retrieving revision 1.335 diff -U2 -r1.334 -r1.335 --- sandweb.cgi 9 Nov 2002 08:31:32 -0000 1.334 +++ sandweb.cgi 4 Jan 2003 23:10:57 -0000 1.335 @@ -2989,5 +2989,5 @@ if ($trunk_sync) { my %params = ( - rev => $trunk_sync, + reset => 1, ); @@ -3006,5 +3006,5 @@ if ($trunk_switch) { my %params = ( - rev => $trunk_switch, + reset => 1, clobber => 1, ); @@ -3215,5 +3215,5 @@ if ($trunk_switch) { my %params = ( - rev => $branch_switch, + reset => 1, clobber => 1, ); |
From: Rob H. <for...@us...> - 2003-01-04 23:08:58
|
Update of /cvsroot/sandweb/sandweb/etc In directory sc8-pr-cvs1:/tmp/cvs-serv5232/etc Modified Files: repository.cfg Log Message: adding "remember_password" attribute to repository tag Index: repository.cfg =================================================================== RCS file: /cvsroot/sandweb/sandweb/etc/repository.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- repository.cfg 5 Feb 2002 05:58:09 -0000 1.1 +++ repository.cfg 4 Jan 2003 23:08:55 -0000 1.2 @@ -6,4 +6,5 @@ username="" password="" + remember_password="" server="" /> |
From: Rob H. <for...@us...> - 2003-01-04 22:55:45
|
Update of /cvsroot/sandweb/sandweb/templates In directory sc8-pr-cvs1:/tmp/cvs-serv1145/templates Modified Files: repository.html submitform.js Log Message: this seems to fix problems with IE and the repository_menu, needs more testing to make sure it doesn't affect anything else. mozilla 1.3 seems to work fine without any intervention on my part, i wonder if the problems we saw before were due to bugs? i'm going to pull a build of moz 1.0 to find out. Index: repository.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/repository.html,v retrieving revision 1.20 retrieving revision 1.21 diff -U2 -r1.20 -r1.21 --- repository.html 7 Oct 2002 06:53:42 -0000 1.20 +++ repository.html 4 Jan 2003 22:55:41 -0000 1.21 @@ -1,3 +1,4 @@ -<form submit="<TMPL_VAR NAME=PROGNAME>" name="repository" method="post"> +<form name="repository" method="post"> +<!-- <TMPL_VAR NAME=PROGNAME> --> <input type="hidden" name="action" value="repository"> <!-- <input type="hidden" name="repository_selected" value="<TMPL_VAR NAME=REPOSITORY_SELECTED>"> --> Index: submitform.js =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/submitform.js,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- submitform.js 12 Mar 2002 05:11:11 -0000 1.1 +++ submitform.js 4 Jan 2003 22:55:41 -0000 1.2 @@ -1,4 +1,3 @@ function submitForm(clicked) { - document.repository.repository_selected.value=clicked; document.repository.submit(); } |
From: Rob H. <for...@us...> - 2002-12-31 06:31:17
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory sc8-pr-cvs1:/tmp/cvs-serv28721/lib/SandWeb Modified Files: Shell.pm Log Message: cool, this is a great place to put the timeout. default timeout for shell commands is now 5 minutes, only thing now is to move this as a config option into sandweb.cfg ( hmm.. this *could* be user configurable I guess, will make it just system config tomorrow and think about user config ) Index: Shell.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Shell.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -U2 -r1.21 -r1.22 --- Shell.pm 7 Nov 2002 08:01:07 -0000 1.21 +++ Shell.pm 31 Dec 2002 06:31:12 -0000 1.22 @@ -30,4 +30,11 @@ use SandWeb::File; +# +# FIXME - timeout should be config option +# +# default timeout for shell commands is 300 minutes ( aka 5 minutes ) +# +my $timeout = '300'; + sub new { my $class = shift; @@ -114,5 +121,24 @@ $log->debug("Using VCS username/password"); $log->debug("Full command is : $sandweb_expect system_vcs $system_username \'$system_password\' \'$vcs_password\' $command"); - my $raw_output = `$sandweb_expect system_vcs $system_username \'$system_password\' \'$vcs_password\' "$command" 2>&1`; + eval { + local $SIG{ALRM} = sub { die "alarm\n" }; + alarm $timeout; + my $raw_output = `$sandweb_expect system_vcs $system_username \'$system_password\' \'$vcs_password\' "$command" 2>&1` or $raw_output = "Timeout of $timeout seconds reached.\n"; + alarm 0; + }; + if ( "$@" eq "alarm" ) { + + my $output = ""; + my $error_message = "Timeout reached of $timeout seconds reached, operation aborted.\n"; + + my %return = ( + output => "$output", + error => "$error_message", + ); + + return %return; + } + + $error = $?; $raw_output =~ s/ /\n/g; @@ -123,5 +149,25 @@ } else { $log->debug("Not using VCS username/password"); - my $raw_output = `$sandweb_expect system $system_username $system_password $command`; + + eval { + local $SIG{ALRM} = sub { die "alarm\n" }; + alarm $timeout; + my $raw_output = `$sandweb_expect system $system_username $system_password $command` or $raw_output = "Timeout of $timeout seconds reached.\n"; + alarm 0; + }; + + if ( "$@" eq "alarm" ) { + + my $output = ""; + my $error_message = "Timeout reached of $timeout seconds reached, operation aborted.\n"; + + my %return = ( + output => "$output", + error => "$error_message", + ); + + return %return; + } + $error = $?; $raw_output =~ s/^M/\n/g; @@ -133,4 +179,5 @@ } elsif ( $vcs ) { $log->debug("Using VCS username/password"); + $log->debug("Full command is : $sandweb_expect vcs $users_dir/passwd \"$command\""); my $file = SandWeb::File->new( 'log_obj' => $log, @@ -143,8 +190,30 @@ ); - my $raw_output = `$sandweb_expect vcs $users_dir/passwd "$command" 2>&1`; - $file->delete(); + my $raw_output; + + eval { + local $SIG{ALRM} = sub { die "alarm\n" }; + alarm $timeout; + my $error_output; + $raw_output = `$sandweb_expect vcs $users_dir/passwd "$command" 2>&1`; + $file->delete(); + alarm 0; + }; + + if ( "$@" eq "alarm" ) { + + my $output = ""; + my $error_message = "Timeout reached of $timeout seconds reached, operation aborted.\n"; + + my %return = ( + output => "$output", + error => "$error_message", + ); + + return %return; + } $error = $?; + $raw_output =~ s/^M/\n/g; my @lined_output = split(/\n/, $raw_output); @@ -155,6 +224,25 @@ if ($log) { $log->debug("Not using VCS username/password"); + } + eval { + local $SIG{ALRM} = sub { die "alarm\n" }; + alarm $timeout; + $output = `$command 2>&1` or $raw_output = "Timeout of $timeout seconds reached.\n"; + + }; + + if ( "$@" eq "alarm" ) { + + my $output = ""; + my $error_message = "Timeout reached of $timeout seconds reached, operation aborted.\n"; + + my %return = ( + output => "$output", + error => "$error_message", + ); + + return %return; } - $output = `$command 2>&1`; + $error = $?; } @@ -184,5 +272,15 @@ if ($command) { - open (FILEHANDLE, "|`$command`"); + eval { + local $SIG{ALRM} = sub { die "alarm\n" }; + alarm $timeout; + open (FILEHANDLE, "|`$command`") or return 0; + alarm 0; + }; + + if ( "$@" eq "alarm" ) { + return 0; + } + return \*FILEHANDLE; } |
From: Rob H. <for...@us...> - 2002-11-09 08:31:36
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv21038/bin Modified Files: sandweb.cgi Log Message: this makes the main window refresh when remember_vcs_password is enabled ( vcs_menu calls vcs_commit directly in this case, instead of asking for the password and letting the CGI take care of it ). The call to vcs_commit in vcs_menu was missing the main_window_url parameter. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.333 retrieving revision 1.334 diff -U2 -r1.333 -r1.334 --- sandweb.cgi 7 Nov 2002 08:01:12 -0000 1.333 +++ sandweb.cgi 9 Nov 2002 08:31:32 -0000 1.334 @@ -1788,4 +1788,5 @@ location => $location, params => $params, + main_window_url => $main_window_url, ); @@ -2366,4 +2367,5 @@ $log->debug("username: $username"); $log->debug("location: $location"); + $log->debug("main_window_url: $main_window_url"); my $repo_server = $user->get_repo_server(repo => $repo_name); |
From: Rob H. <for...@us...> - 2002-11-07 08:01:44
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv15989/lib/SandWeb/Repository Modified Files: cvs.pm Log Message: this checkin enables : * vcs password support for tag/branch * security problem with sandweb-expect ( password showing up in process list ) is solved Index: cvs.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/cvs.pm,v retrieving revision 1.33 retrieving revision 1.34 diff -U2 -r1.33 -r1.34 --- cvs.pm 17 Oct 2002 07:01:32 -0000 1.33 +++ cvs.pm 7 Nov 2002 08:01:09 -0000 1.34 @@ -35,14 +35,19 @@ # root is the path on the remote file system to the CVS repository + # ( required ) my $root = $args{'root'} || ''; # sandbox is the local directory that the user's sandbox for this - # repo begins + # repo begins ( required ) my $sandbox = $args{'sandbox'} || ''; + # users_dir is the user's SandWeb home directory ( required ) + my $users_dir = $args{'users_dir'} || ''; + # connection is the CVS connection type, SSH, pserver, local, etc + # ( required ) my $connection = $args{'connection'} || ''; - # server is the name of the CVS server + # server is the name of the CVS server ( required ) my $server = $args{'server'} || ''; @@ -75,4 +80,5 @@ 'root' => $root, 'sandbox' => $sandbox, + 'users_dir' => $users_dir, 'connection' => $connection, 'server' => $server, @@ -759,4 +765,5 @@ my $root = $self->get_root() || ''; my $sandbox = $self->get_sandbox() || ''; + my $users_dir = $self->get_users_dir() || ''; my $connection = $self->get_connection() || ''; my $server = $self->get_server() || ''; @@ -790,7 +797,7 @@ my $shell = SandWeb::Shell->new( 'vcs_username' => "$vcs_username", + 'users_dir' => "$users_dir", 'vcs_password' => "$vcs_password", 'system_username' => "$system_username", - 'system_password' => "$system_password", 'bindir' => "$bindir", 'system' => "$system", @@ -810,4 +817,14 @@ if ($self->{'sandbox'}) { return $self->{'sandbox'}; + } + else { + return 0; + } +} + +sub get_users_dir { + my $self = shift; + if ($self->{'users_dir'}) { + return $self->{'users_dir'}; } else { |
From: Rob H. <for...@us...> - 2002-11-07 08:01:44
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv15989/lib/SandWeb Modified Files: Repository.pm Shell.pm Log Message: this checkin enables : * vcs password support for tag/branch * security problem with sandweb-expect ( password showing up in process list ) is solved Index: Repository.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository.pm,v retrieving revision 1.46 retrieving revision 1.47 diff -U2 -r1.46 -r1.47 --- Repository.pm 19 Jun 2002 07:19:04 -0000 1.46 +++ Repository.pm 7 Nov 2002 08:01:06 -0000 1.47 @@ -48,4 +48,8 @@ my $sandbox = $args{'sandbox'} || ''; + # $users_dir specifies user's SandWeb home directory + + my $users_dir = $args{'users_dir'} || ''; + # $server specifies the hostname of the current repo server @@ -94,4 +98,5 @@ 'root' => $root, 'sandbox' => $sandbox, + 'users_dir' => $users_dir, 'connection' => $connection, 'server' => $server, @@ -901,4 +906,5 @@ my $root = $self->get_root() || ''; my $sandbox = $self->get_sandbox() || ''; + my $users_dir = $self->get_users_dir() || ''; my $connection = $self->get_connection(); my $server = $self->get_server(); @@ -922,4 +928,5 @@ root => $root, sandbox => $sandbox, + users_dir => $users_dir, connection => $connection, server => $server, @@ -1020,4 +1027,14 @@ if ($self->{'sandbox'}) { return $self->{'sandbox'}; + } + else { + return 0; + } +} + +sub get_users_dir { + my $self = shift; + if ($self->{'users_dir'}) { + return $self->{'users_dir'}; } else { Index: Shell.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Shell.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -U2 -r1.20 -r1.21 --- Shell.pm 5 Oct 2002 18:35:48 -0000 1.20 +++ Shell.pm 7 Nov 2002 08:01:07 -0000 1.21 @@ -28,4 +28,6 @@ package SandWeb::Shell; +use SandWeb::File; + sub new { my $class = shift; @@ -42,4 +44,7 @@ my $system_password = $args{'system_password'} || ''; + # users_dir is the user's SandWeb home directory ( required ) + my $users_dir = $args{'users_dir'} || ''; + # vcs_username is the user's VCS username on the local box # ( optional ) @@ -65,4 +70,5 @@ 'system_username' => "$system_username", 'system_password' => "$system_password", + 'users_dir' => "$users_dir", 'vcs_username' => "$vcs_username", 'vcs_password' => "$vcs_password", @@ -92,4 +98,5 @@ my $vcs_password = $self->{'vcs_password'}; my $system = $self->{'system'} || ''; + my $users_dir = $self->{'users_dir'} || ''; my $vcs = $self->{'vcs'} || ''; my $log = $self->{'log'} || ''; @@ -126,5 +133,17 @@ } elsif ( $vcs ) { $log->debug("Using VCS username/password"); - my $raw_output = `$sandweb_expect vcs \'$vcs_password\' "$command" 2>&1`; + my $file = SandWeb::File->new( + 'log_obj' => $log, + 'filename' => "passwd", + 'location' => "$users_dir", + ); + + $file->file_write( + contents => "$vcs_password", + ); + + my $raw_output = `$sandweb_expect vcs $users_dir/passwd "$command" 2>&1`; + $file->delete(); + $error = $?; $raw_output =~ s/^M/\n/g; |
From: Rob H. <for...@us...> - 2002-11-07 08:01:23
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv15989/bin Modified Files: sandweb-expect sandweb.cgi Log Message: this checkin enables : * vcs password support for tag/branch * security problem with sandweb-expect ( password showing up in process list ) is solved Index: sandweb-expect =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb-expect,v retrieving revision 1.9 retrieving revision 1.10 diff -U2 -r1.9 -r1.10 --- sandweb-expect 6 Nov 2002 05:54:28 -0000 1.9 +++ sandweb-expect 7 Nov 2002 08:01:10 -0000 1.10 @@ -1,83 +1,44 @@ #!expect -# System account, vcs password : -# input : system_vcs system_username system_password vcs_password vcs_command +# +# input : vcs users_dir vcs_command # -# Unix account, no vcs password : -# input : system system_username system_password vcs_command -# -# No Unix account, vcs password: -# input : vcs vcs_password vcs_command set timeout -1 -if {[lindex $argv 0]=="system_vcs"} { - set system_username [lindex $argv 1] - set system_password [lindex $argv 2] - set vcs_password [lindex $argv 5] - set vcs_command [lindex $argv 6] - - spawn /bin/su - $system_username -c $vcs_command - - expect { - "Password:" { send "$system_password\r" } - "password:" { send "$vcs_password\r" } - "Sorry." { - send "Invalid system username/password\r" - exit 1 - } - "Are you sure" { send "yes\r" } - eof { - send_user "Unexpected EOF\r\n" - exit 3 - } - } -} - -if {[lindex $argv 0]=="system"} { - set system_username [lindex $argv 1] - set system_password [lindex $argv 2] - set vcs_command [lindex $argv 3] - - spawn /bin/su - $system_username -c $vcs_command - - expect { - "Password:" { send "$system_password\r" } - "Sorry." { - send "Invalid system username/password\r" - exit 1 - } - eof { - send_user "Unexpected EOF\r\n" - exit 3 - } - } -} - if {[lindex $argv 0]=="vcs"} { - set vcs_password [lindex $argv 1] + + set users_dir [lindex $argv 1] set vcs_command [lindex $argv 2] - spawn /bin/sh -c $vcs_command + set file [ open $users_dir r ] - expect { - "password:" { send "$vcs_password\r" } - } + foreach line [ split [ read $file ] "\n" ] { + set vcs_password [ lindex $line 0 ] - expect { + spawn /bin/sh -c $vcs_command - "Are you sure" { - send "y" + expect { + "password:" { send "$vcs_password\r" } } - "denied" { - send "Invalid VCS username/password\r" - exit 2 - } + expect { - eof { - # success - exit 0 + "Are you sure" { + send "y" + } + + "denied" { + send "Invalid VCS username/password\r" + exit 2 + } + + eof { + # success + exit 0 + } } + + close $file } } Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.332 retrieving revision 1.333 diff -U2 -r1.332 -r1.333 --- sandweb.cgi 6 Nov 2002 22:57:57 -0000 1.332 +++ sandweb.cgi 7 Nov 2002 08:01:12 -0000 1.333 @@ -739,4 +739,5 @@ 'root' => $repo_root, 'connection' => $repo_connection, + 'users_dir' => $users_dir, 'vcs_username' => $repo_username, 'vcs_password' => $repo_password, @@ -1697,5 +1698,8 @@ # vcs menu # -# asks user for VCS password +# asks user for VCS password, if the user does not have +# remember_vcs_password selected for the current repository. +# +# All VCS commands go through this subroutine. # # args: @@ -1721,8 +1725,13 @@ my $vcs_command = $args{'vcs_command'}; my $vcs_message = $args{'message'}; - my $main_window_url = "$ENV{'HTTP_REFERER'}"; + my $params = $args{'params'}; + my $main_window_url = $args{'main_window_url'} || ''; my @filename_loop = (); my $count = 0; + unless ($main_window_url) { + $main_window_url = "$ENV{'HTTP_REFERER'}"; + } + my $remember_repo_password = $user->get_remember_repo_password(repo => $repo_name); @@ -1778,4 +1787,5 @@ filename => \@filename, location => $location, + params => $params, ); @@ -2342,6 +2352,15 @@ my $repo_name = $args{'repo_name'}; my $main_window_url = $args{'main_window_url'}; + my $params = $args{'params'} || ''; + my %return; + # dereference params hash + my %params; + + if ($params) { + %params = %$params; + } + $log->debug("module_name: $module_name"); $log->debug("username: $username"); @@ -2403,4 +2422,5 @@ repo_type => $repo_type, sandbox => "$users_dir/$username/$repo_name/$module_name/$location", + users_dir => "$users_dir/$username", 'ssh_bin' => $ssh_bin, 'cvs_bin' => $cvs_bin, @@ -2530,4 +2550,5 @@ %return = $repository->$vcs_command( file => "$file", + %params, ); push (@vcs_output, "$return{'output'}\n"); @@ -2859,6 +2880,4 @@ # processes calls from tag menu to sync with/switch to trunk or tagname # -# A Repository object is created and used. -# # args: # ck_auth - the sessions cookie @@ -2925,21 +2944,4 @@ my @vcs_error = (); - my $repository = SandWeb::Repository->new( - root => $repo_root, - connection => $repo_connection, - 'vcs_username' => $repo_username, - 'vcs_password' => $repo_password, - 'unix_auth' => $unix_auth, - 'system_username' => $system_username, - 'system_password' => $system_password, - server => $repo_server, - repo_type => $repo_type, - sandbox => "$users_dir/$username/$repo_name/$module_name/$location", - 'ssh_bin' => $ssh_bin, - 'cvs_bin' => $cvs_bin, - 'bindir' => $bindir, - 'log_obj' => $log, - ); - $log->debug("Repo name: $repo_name"); $log->debug("Repo root: $repo_root"); @@ -2949,66 +2951,108 @@ if ($tag_sync) { - foreach my $file (@filename) { - %return = $repository->update( - file => "$file", - rev => "$tag_sync", - ); - push (@vcs_output, "$return{'output'}\n"); - push (@vcs_error, "$return{'error'}\n"); - } + my %params = ( + rev => $tag_sync, + ); + + vcs_menu( + ck_auth => $ck_auth, + vcs_command => 'update', + module_name => $module_name, + repo_name => $repo_name, + repo_password => $repo_password, + filename => \@filename, + location => $location, + params => \%params, + main_window_url => $main_window_url, + ); } if ($tag_switch) { - foreach my $file (@filename) { - %return = $repository->update( - file => "$file", - rev => "$tag_switch", - clobber => 1, - ); - push (@vcs_output, "$return{'output'}\n"); - push (@vcs_error, "$return{'error'}\n"); - } + my %params = ( + rev => $tag_switch, + clobber => 1, + ); + + vcs_menu( + ck_auth => $ck_auth, + vcs_command => 'update', + module_name => $module_name, + repo_name => $repo_name, + repo_password => $repo_password, + filename => \@filename, + location => $location, + params => \%params, + main_window_url => $main_window_url, + ); } if ($trunk_sync) { - foreach my $file (@filename) { - %return = $repository->update( - file => "$file", - reset => 1, - ); - push (@vcs_output, "$return{'output'}\n"); - push (@vcs_error, "$return{'error'}\n"); - } + my %params = ( + rev => $trunk_sync, + ); + + vcs_menu( + ck_auth => $ck_auth, + vcs_command => 'update', + module_name => $module_name, + repo_name => $repo_name, + repo_password => $repo_password, + filename => \@filename, + location => $location, + params => \%params, + main_window_url => $main_window_url, + ); } if ($trunk_switch) { - foreach my $file (@filename) { - %return = $repository->update( - file => "$file", - clobber => 1, - reset => 1, - ); - push (@vcs_output, "$return{'output'}\n"); - push (@vcs_error, "$return{'error'}\n"); - } + my %params = ( + rev => $trunk_switch, + clobber => 1, + ); + + vcs_menu( + ck_auth => $ck_auth, + vcs_command => 'update', + module_name => $module_name, + repo_name => $repo_name, + repo_password => $repo_password, + filename => \@filename, + location => $location, + params => \%params, + main_window_url => $main_window_url, + ); } if ($create_tag) { - foreach my $file (@filename) { - %return = $repository->tag( - file => "$file", - name => "$create_tag", - ); - push (@vcs_output, "$return{'output'}\n"); - push (@vcs_error, "$return{'error'}\n"); - } + my %params = ( + name => "$create_tag", + ); + + vcs_menu( + ck_auth => $ck_auth, + vcs_command => 'tag', + module_name => $module_name, + repo_name => $repo_name, + repo_password => $repo_password, + filename => \@filename, + location => $location, + params => \%params, + main_window_url => $main_window_url, + ); } if ($remove_tag) { - foreach my $file (@filename) { - %return = $repository->tag( - file => "$file", - name => "$remove_tag", - delete => 1, - ); - push (@vcs_output, "$return{'output'}\n"); - push (@vcs_error, "$return{'error'}\n"); - } + my %params = ( + delete => 1, + name => "$remove_tag", + ); + + vcs_menu( + ck_auth => $ck_auth, + vcs_command => 'tag', + module_name => $module_name, + repo_name => $repo_name, + repo_password => $repo_password, + filename => \@filename, + location => $location, + params => \%params, + main_window_url => $main_window_url, + ); } @@ -3109,21 +3153,4 @@ my @vcs_error = (); - my $repository = SandWeb::Repository->new( - root => $repo_root, - connection => $repo_connection, - 'vcs_username' => $repo_username, - 'vcs_password' => $repo_password, - 'unix_auth' => $unix_auth, - 'system_username' => $system_username, - 'system_password' => $system_password, - server => $repo_server, - repo_type => $repo_type, - sandbox => "$users_dir/$username/$repo_name/$module_name/$location", - 'ssh_bin' => $ssh_bin, - 'cvs_bin' => $cvs_bin, - 'bindir' => $bindir, - 'log_obj' => $log, - ); - $log->debug("Repo name: $repo_name"); $log->debug("Repo root: $repo_root"); @@ -3133,68 +3160,109 @@ if ($branch_sync) { - foreach my $file (@filename) { - %return = $repository->update( - file => "$file", - rev => "$branch_sync", - ); - push (@vcs_output, "$return{'output'}\n"); - push (@vcs_error, "$return{'error'}\n"); - } + my %params = ( + rev => $branch_sync, + ); + + vcs_menu( + ck_auth => $ck_auth, + vcs_command => 'update', + module_name => $module_name, + repo_name => $repo_name, + repo_password => $repo_password, + filename => \@filename, + location => $location, + params => \%params, + main_window_url => $main_window_url, + ); } if ($branch_switch) { - foreach my $file (@filename) { - %return = $repository->update( - file => "$file", - rev => "$branch_switch", - clobber => 1, - ); - push (@vcs_output, "$return{'output'}\n"); - push (@vcs_error, "$return{'error'}\n"); - } + my %params = ( + rev => $branch_switch, + clobber => 1, + ); + + vcs_menu( + ck_auth => $ck_auth, + vcs_command => 'update', + module_name => $module_name, + repo_name => $repo_name, + repo_password => $repo_password, + filename => \@filename, + location => $location, + params => \%params, + main_window_url => $main_window_url, + ); } if ($trunk_sync) { - foreach my $file (@filename) { - %return = $repository->update( - file => "$file", - reset => 1, - ); - push (@vcs_output, "$return{'output'}\n"); - push (@vcs_error, "$return{'error'}\n"); - } + my %params = ( + reset => 1, + ); + + vcs_menu( + ck_auth => $ck_auth, + vcs_command => 'update', + module_name => $module_name, + repo_name => $repo_name, + repo_password => $repo_password, + filename => \@filename, + location => $location, + params => \%params, + main_window_url => $main_window_url, + ); } if ($trunk_switch) { - foreach my $file (@filename) { - %return = $repository->update( - file => "$file", - clobber => 1, - reset => 1, - ); - push (@vcs_output, "$return{'output'}\n"); - push (@vcs_error, "$return{'error'}\n"); - } + my %params = ( + rev => $branch_switch, + clobber => 1, + ); + + vcs_menu( + ck_auth => $ck_auth, + vcs_command => 'update', + module_name => $module_name, + repo_name => $repo_name, + repo_password => $repo_password, + filename => \@filename, + location => $location, + params => \%params, + main_window_url => $main_window_url, + ); } if ($create_branch) { - foreach my $file (@filename) { - %return = $repository->tag( - file => "$file", - name => "$create_branch", - branch => 1, - ); - push (@vcs_output, "$return{'output'}\n"); - push (@vcs_error, "$return{'error'}\n"); - } + my %params = ( + branch => 1, + name => $create_branch, + ); + + vcs_menu( + ck_auth => $ck_auth, + vcs_command => 'tag', + module_name => $module_name, + repo_name => $repo_name, + repo_password => $repo_password, + filename => \@filename, + location => $location, + params => \%params, + main_window_url => $main_window_url, + ); } if ($remove_branch) { - foreach my $file (@filename) { - %return = $repository->tag( - file => "$file", - name => "$remove_branch", - branch => 1, - delete => 1, - ); - push (@vcs_output, "$return{'output'}\n"); - push (@vcs_error, "$return{'error'}\n"); - } + my %params = ( + delete => 1, + name => "$remove_branch", + ); + + vcs_menu( + ck_auth => $ck_auth, + vcs_command => 'tag', + module_name => $module_name, + repo_name => $repo_name, + repo_password => $repo_password, + filename => \@filename, + location => $location, + params => \%params, + main_window_url => $main_window_url, + ); } |
From: Rob H. <for...@us...> - 2002-11-06 22:58:01
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv16993/bin Modified Files: sandweb.cgi Log Message: hmm, i had accidently commented out the filename that is passed if the user DOES opt to save their password, now it works both ways ( with or without remember_repo_password set ) Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.331 retrieving revision 1.332 diff -U2 -r1.331 -r1.332 --- sandweb.cgi 6 Nov 2002 22:44:06 -0000 1.331 +++ sandweb.cgi 6 Nov 2002 22:57:57 -0000 1.332 @@ -1776,5 +1776,5 @@ repo_name => $repo_name, repo_password => $repo_password, - #filename => \@filename, + filename => \@filename, location => $location, ); |
From: Rob H. <for...@us...> - 2002-11-06 22:44:18
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv6646a/bin Modified Files: sandweb.cgi Log Message: ok, now the sandbox_commit can handle vcs passwords, I made it go through the vcs_menu subroutine instead of calling Repository itself ( because then I'd have to copy&paste the whole password checking thing, which is not very re-useful. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.330 retrieving revision 1.331 diff -U2 -r1.330 -r1.331 --- sandweb.cgi 6 Nov 2002 05:34:42 -0000 1.330 +++ sandweb.cgi 6 Nov 2002 22:44:06 -0000 1.331 @@ -1767,4 +1767,5 @@ } + if ($remember_repo_password) { @@ -1775,5 +1776,5 @@ repo_name => $repo_name, repo_password => $repo_password, - filename => \@filename, + #filename => \@filename, location => $location, ); @@ -2580,5 +2581,4 @@ my $repo_username = $user->get_repo_username(repo => $repo_name); my $repo_password = $user->get_repo_password(repo => $repo_name); - my $remember_repo_password = $user->get_remember_repo_password(repo => $repo_name); my $repo_type = $user->get_repo_type(repo => $repo_name); my $repo_connection = $user->get_repo_connection(repo => $repo_name); @@ -2599,7 +2599,7 @@ if ($user->module_exists(repo => $repo_name, module => $module_name)) { $user->update_module( - repo => $repo_name, - module => $module_name, - module_description => $module_description, + repo => $repo_name, + module => $module_name, + module_description => $module_description, ); } else { @@ -2610,7 +2610,7 @@ $do_vcs_action = 1; $user->add_module( - repo => $repo_name, - module => $module_name, - module_description => $module_description, + repo => $repo_name, + module => $module_name, + module_description => $module_description, ); } @@ -2627,70 +2627,33 @@ my @vcs_error = (); - my $repository = SandWeb::Repository->new( - root => $repo_root, - connection => $repo_connection, - 'vcs_username' => $repo_username, - 'vcs_password' => $repo_password, - 'unix_auth' => $unix_auth, - 'system_username' => $system_username, - 'system_password' => $system_password, - server => $repo_server, - repo_type => $repo_type, - sandbox => "$users_dir/$username/$repo_name", - 'ssh_bin' => $ssh_bin, - 'cvs_bin' => $cvs_bin, - 'bindir' => $bindir, - 'log_obj' => $log, - ); + my $vcs_command; - my %return; if ($submit eq 'Checkout') { - %return = $repository->checkout( - file => "$module_name", - ); + $vcs_command = "checkout"; } elsif ($submit eq 'Update') { - %return = $repository->update( - file => "$module_name", - ); + $vcs_command = "update"; } - push (@vcs_output, "$return{'output'}\n"); - push (@vcs_error, "$return{'error'}\n"); - $log->debug('dump', \%return); - - if ($return{'errorlevel'}) { - # vcs action failed - $log->debug("failed checkout/update of module '$module_name'\n"); - set_message("failed checkout/update of module '$module_name'\n"); - } else { - my $return = write_config(); - if (! $return) { - # uh oh, problem occured - sandbox( ck_auth => $ck_auth ); - } + my @filename = $module_name; + + my $return = write_config(); + + if (! $return) { + # uh oh, problem occured + sandbox( ck_auth => $ck_auth ); } - my $content = $ui->get_menu( - MENU => 'vcs_output', - LOCATION => $module_name, #$location, - #FILENAME => "@filename", - PROGNAME => $progname, - VCS_OUTPUT => join('', @vcs_output), - VCS_ERROR => join('', @vcs_error), - ); - - $log->debug("HTTP_REFERER: $ENV{'HTTP_REFERER'}"); - my $prev_url = "$ENV{'HTTP_REFERER'}"; - $log->debug("prev_url $prev_url"); - print $cgi->header( -cookie => $ck_auth ); - $ui->print_popup( - TITLE=> "SandWeb : vcs output", - MENU_TITLE => 'SandWeb', - SUBMENU_TITLE => "vcs output", - PREVIOUS_URL => "$progname?action=sandbox", - FOOTER => '', - CONTENT => $content, - MESSAGE => $message, + + vcs_menu( + ck_auth => $ck_auth, + vcs_command => $vcs_command, + module_name => '', + repo_name => $repo_name, + repo_password => $repo_password, + filename => \@filename, + location => '', ); + exit 0; + } elsif ($submit eq 'Delete') { # |
From: Rob H. <for...@us...> - 2002-11-06 05:54:31
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv8664/bin Modified Files: sandweb-expect Log Message: improved error handling muchly, now fails _correctly_ if the password is false, instead of hanging indefinitely (!) Index: sandweb-expect =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb-expect,v retrieving revision 1.8 retrieving revision 1.9 diff -U2 -r1.8 -r1.9 --- sandweb-expect 11 Jul 2002 08:11:35 -0000 1.8 +++ sandweb-expect 6 Nov 2002 05:54:28 -0000 1.9 @@ -63,12 +63,20 @@ expect { "password:" { send "$vcs_password\r" } - "Are you sure" { send "yes\r" } - "Permission denied" { + } + + expect { + + "Are you sure" { + send "y" + } + + "denied" { send "Invalid VCS username/password\r" exit 2 } + eof { - send_user "Unexpected EOF\r\n" - exit 3 + # success + exit 0 } } |