While looking a this product, I found that the attached
changes provide for more flexability to more tightly
control printer configuration options. Particularly
removing printers and changing the default printer.
*** edit_printer.cgi-old Wed Apr 3 15:03:16 2002
--- edit_printer.cgi Wed Apr 3 15:26:46 2002
***************
*** 99,105 ****
}
else { print "<tr>\n"; }
! if (&printer_support('default')) {
print "<td
align=right><b>$text{'edit_default'}</b></td> <td>\n";
if (!$prn{'default'}) {
printf "<input type=radio name=default
value=1 %s> $text{'yes'}\
n", $prn{'default'} ? "checked" : "";
--- 99,106 ----
}
else { print "<tr>\n"; }
! # Limit who can change the default printer.
! if ($access{'default'} && &printer_support('default')) {
print "<td
align=right><b>$text{'edit_default'}</b></td> <td>\n";
if (!$prn{'default'}) {
printf "<input type=radio name=default
value=1 %s> $text{'yes'}\
n", $prn{'default'} ? "checked" : "";
***************
*** 277,286 ****
else {
print "<table width=100%>\n";
print "<tr> <td><input type=submit
value=\&quot;$text{'save'}\&quot;></td>\n";
! print "</form><form
action=\&quot;delete_printer.cgi\&quot;>\n";
! print "<input type=hidden name=name
value=\&quot;$in{'name'}\&quot;>\n";
! print "<td align=right><input type=submit ",
! "value=\&quot;$text{'delete'}\&quot;></td> </tr>\n";
print "</form></table><p>\n";
}
print $after;
--- 278,291 ----
else {
print "<table width=100%>\n";
print "<tr> <td><input type=submit
value=\&quot;$text{'save'}\&quot;></td>\n";
! # Just like adding, deleting should be restricted.
! if ($access{'delete'}) {
! print "</form><form
action=\&quot;delete_printer.cgi\&quot;>\n";
! print "<input type=hidden name=name
value=\&quot;$in{'name'}\&quot;>\n";
! print "<td align=right><input
type=submit ",
! "value=\&quot;$text{'delete'}\&quot;></td>";
! }
! print " </tr>\n";
print "</form></table><p>\n";
}
print $after;