new config value `defaultrecords', documentation, javascript config file editor
[freeside.git] / FS / FS / Conf.pm
index 8195fc5..18725ce 100644 (file)
@@ -129,7 +129,9 @@ sub set {
     warn "[FS::Conf] SET $file\n" if $DEBUG;
 #    warn "$dir" if is_tainted($dir);
 #    warn "$dir" if is_tainted($file);
+    chmod 0644, "$dir/$file";
     my $fh = new IO::File ">$dir/$file" or return;
+    chmod 0644, "$dir/$file";
     print $fh "$value\n";
   }
 }
@@ -183,12 +185,19 @@ httemplate/docs/config.html
 
   {
     'key'         => 'address',
-    'section'     => 'depreciated',
+    'section'     => 'deprecated',
     'description' => 'This configuration option is no longer used.  See <a href="#invoice_template">invoice_template</a> instead.',
     'type'        => 'text',
   },
 
   {
+    'key'         => 'alerter_template',
+    'section'     => 'billing',
+    'description' => 'Template file for billing method expiration alerts.  See the <a href="../docs/billing.html#invoice_template">billing documentation</a> for details.',
+    'type'        => 'textarea',
+  },
+
+  {
     'key'         => 'apacheroot',
     'section'     => 'apache',
     'description' => 'The directory containing Apache virtual hosts',
@@ -196,6 +205,13 @@ httemplate/docs/config.html
   },
 
   {
+    'key'         => 'apacheip',
+    'section'     => 'apache',
+    'description' => 'The current IP address to assign to new virtual hosts',
+    'type'        => 'text',
+  },
+
+  {
     'key'         => 'apachemachine',
     'section'     => 'apache',
     'description' => 'A machine with the apacheroot directory and user home directories.  The existance of this file enables setup of virtual host directories, and, in conjunction with the `home\' configuration file, symlinks into user home directories.',
@@ -259,6 +275,13 @@ httemplate/docs/config.html
   },
 
   {
+    'key'         => 'cp_app',
+    'section'     => 'mail',
+    'description' => 'Integration with <a href="http://www.cp.net/">Critial Path Account Provisioning Protocol</a>, four lines: "host:port", username, password, and workgroup (for new users).',
+    'type'        => 'textarea',
+  },
+
+  {
     'key'         => 'deletecustomers',
     'section'     => 'UI',
     'description' => 'Enable customer deletions.  Be very careful!  Deleting a customer will remove all traces that this customer ever existed!  It should probably only be used when auditing a legacy database.  Normally, you cancel all of a customers\' packages if they cancel service.',
@@ -266,6 +289,13 @@ httemplate/docs/config.html
   },
 
   {
+    'key'         => 'deletepayments',
+    'section'     => 'UI',
+    'description' => 'Enable deletion of unclosed payments.  Be very careful!  Only delete payments that were data-entry errors, not adjustments.',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'dirhash',
     'section'     => 'shell',
     'description' => 'Optional numeric value to control directory hashing.  If positive, hashes directories for the specified number of levels from the front of the username.  If negative, hashes directories for the specified number of levels from the end of the username.  Some examples: <ul><li>1: user -> <a href="#home">/home</a>/u/user<li>2: user -> <a href="#home">/home</a>/u/s/user<li>-1: user -> <a href="#home">/home</a>/r/user<li>-2: user -> <a href="#home">home</a>/r/e/user</ul>',
@@ -281,7 +311,7 @@ httemplate/docs/config.html
 
   {
     'key'         => 'domain',
-    'section'     => 'depreciated',
+    'section'     => 'deprecated',
     'description' => 'Your domain name.',
     'type'        => 'text',
   },
@@ -345,28 +375,28 @@ httemplate/docs/config.html
   {
     'key'         => 'icradiusmachines',
     'section'     => 'radius',
-    'description' => 'Your <a href="ftp://ftp.cheapnet.net/pub/icradius">ICRADIUS</a> machines or <a href="http://www.freeradius.org/">FreeRADIUS</a> (with MySQL authentication) machines, one per line.  Turning this option on (even if empty) turns on radcheck table population (in the freeside database - the radcheck table needs to be created manually).  Machines listed in this file will have the radcheck table exported to them.  Each line should contain four items, separted by whitespace: machine name, MySQL database name, MySQL username, and MySQL password.  For example: "<CODE>radius.isp.tld&nbsp;radius_db&nbsp;radius_user&nbsp;passw0rd</CODE>".  You do not need to use MySQL for your Freeside database to export to an ICRADIUS/FreeRADIUS mysql database with this option.',
+    'description' => 'Turn this option on to enable radcheck and radreply table population - by default in the Freeside database, or in the database specified by the <a href="http://rootwood.haze.st/aspside/config/config-view.cgi#icradius_secrets">icradius_secrets</a> config option (the radcheck and radreply tables needs to be created manually).  You do not need to use MySQL for your Freeside database to export to an ICRADIUS/FreeRADIUS MySQL database with this option.  <blockquote><b>ADDITIONAL DEPRECATED FUNCTIONALITY</b> (instead use <a href="http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Replication">MySQL replication</a> or point icradius_secrets to the external database) - your <a href="ftp://ftp.cheapnet.net/pub/icradius">ICRADIUS</a> machines or <a href="http://www.freeradius.org/">FreeRADIUS</a> (with MySQL authentication) machines, one per line.  Machines listed in this file will have the radcheck table exported to them.  Each line should contain four items, separted by whitespace: machine name, MySQL database name, MySQL username, and MySQL password.  For example: <CODE>"radius.isp.tld&nbsp;radius_db&nbsp;radius_user&nbsp;passw0rd"</CODE></blockquote>',
     'type'        => [qw( checkbox textarea )],
   },
 
   {
     'key'         => 'icradius_mysqldest',
     'section'     => 'radius',
-    'description' => 'Destination directory for the MySQL databases, on the ICRADIUS/FreeRADIUS machines.  Defaults to "/usr/local/var/".',
+    'description' => '<b>DEPRECATED</b> (instead use <a href="http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Replication">MySQL replication</a> or point icradius_secrets to the external database) - Destination directory for the MySQL databases, on the ICRADIUS/FreeRADIUS machines.  Defaults to "/usr/local/var/".',
     'type'        => 'text',
   },
 
   {
     'key'         => 'icradius_mysqlsource',
     'section'     => 'radius',
-    'description' => 'Source directory for for the MySQL radcheck table files, on the Freeside machine.  Defaults to "/usr/local/var/freeside".',
+    'description' => '<b>DEPRECATED</b> (instead use <a href="http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Replication">MySQL replication</a> or point icradius_secrets to the external database) - Source directory for for the MySQL radcheck table files, on the Freeside machine.  Defaults to "/usr/local/var/freeside".',
     'type'        => 'text',
   },
 
   {
     'key'         => 'icradius_secrets',
     'section'     => 'radius',
-    'description' => 'Optionally specifies a MySQL database for ICRADIUS/FreeRADIUS export, if you\'re not running MySQL for your Freeside database.  The database should be on the Freeside machine and store data in the <a href="#icradius_mysqlsource">icradius_mysqlsource</a> directory.  Three lines: DBI data source, username and password.',
+    'description' => 'Optionally specifies a database for ICRADIUS/FreeRADIUS export.  Three lines: DBI data source, username and password.',
     'type'        => 'textarea',
   },
 
@@ -393,8 +423,8 @@ httemplate/docs/config.html
 
   {
     'key'         => 'maildisablecatchall',
-    'section'     => 'depreciated',
-    'description' => '<b>DEPRECIATED</b>, now the default.  Turning this option on used to disable the requirement that each virtual domain have a catch-all mailbox.',
+    'section'     => 'deprecated',
+    'description' => '<b>DEPRECATED</b>, now the default.  Turning this option on used to disable the requirement that each virtual domain have a catch-all mailbox.',
     'type'        => 'checkbox',
   },
 
@@ -407,19 +437,45 @@ httemplate/docs/config.html
 
   {
     'key'         => 'mxmachines',
-    'section'     => 'BIND',
+    'section'     => 'deprecated',
     'description' => 'MX entries for new domains, weight and machine, one per line, with trailing `.\'',
     'type'        => 'textarea',
   },
 
   {
     'key'         => 'nsmachines',
-    'section'     => 'BIND',
+    'section'     => 'deprecated',
     'description' => 'NS nameservers for new domains, one per line, with trailing `.\'',
     'type'        => 'textarea',
   },
 
   {
+    'key'         => 'defaultrecords',
+    'section'     => 'BIND',
+    'description' => 'DNS entries add automatically when creating a domain',
+    'type'        => 'editlist',
+    'editlist_parts' => [ { type=>'text' },
+                          { type=>'immutable', value=>'IN' },
+                          { type=>'select',
+                            select_enum=>{ map { $_=>$_ } qw(A CNAME MX NS)} },
+                          { type=> 'text' }, ],
+  },
+
+  {
+    'key'         => 'arecords',
+    'section'     => 'deprecated',
+    'description' => 'A list of tab seperated CNAME records to add automatically when creating a domain',
+    'type'        => 'textarea',
+  },
+
+  {
+    'key'         => 'cnamerecords',
+    'section'     => 'deprecated',
+    'description' => 'A list of tab seperated CNAME records to add automatically when creating a domain',
+    'type'        => 'textarea',
+  },
+
+  {
     'key'         => 'nismachines',
     'section'     => 'shell',
     'description' => 'Your NIS master (not slave master) machines, one per line.  This enables export of `/etc/global/passwd\' and `/etc/global/shadow\'.',
@@ -468,6 +524,14 @@ httemplate/docs/config.html
 #  },
 
   {
+    'key'         => 'report_template',
+    'section'     => 'required',
+    'description' => 'Required template file for reports.  See the <a href="../docs/billing.html">billing documentation</a> for details.',
+    'type'        => 'textarea',
+  },
+
+
+  {
     'key'         => 'maxsearchrecordsperpage',
     'section'     => 'UI',
     'description' => 'If set, number of search records to return per page.',
@@ -623,9 +687,16 @@ httemplate/docs/config.html
   },
 
   {
+    'key'         => 'radiusprepend',
+    'section'     => 'radius',
+    'description' => 'The contents will be prepended to the top of the RADIUS users file (text exports only).',
+    'type'        => 'textarea',
+  },
+
+  {
     'key'         => 'textradiusprepend',
-    'section'     => 'depreciated',
-    'description' => '<b>DEPRECIATED</b>, use RADIUS check attributes instead.  This option will be removed soon.  The contents will be prepended to the first line of a user\'s RADIUS entry in text exports.',
+    'section'     => 'deprecated',
+    'description' => '<b>DEPRECATED</b>, use RADIUS check attributes instead.  This option will be removed soon.  The contents will be prepended to the first line of a user\'s RADIUS entry in text exports.',
     'type'        => 'text',
   },
 
@@ -688,9 +759,10 @@ httemplate/docs/config.html
   {
     'key'         => 'username_policy',
     'section'     => '',
-    'description' => 'This file controls the mechanism for preventing duplicate usernames in passwd/radius files exported from svc_accts.  This should be one of \'prepend domsvc\' \'append domsvc\' or \'append domain\'',
-#    'type'        => 'select',
-    'type'        => 'text',
+    'description' => 'This file controls the mechanism for preventing duplicate usernames in passwd/radius files exported from svc_accts.  This should be one of \'prepend domsvc\' \'append domsvc\' \'append domain\' or \'append @domain\'',
+    'type'        => 'select',
+    'select_enum' => [ 'prepend domsvc', 'append domsvc', 'append domain', 'append @domain' ],
+    #'type'        => 'text',
   },
 
   {
@@ -700,6 +772,48 @@ httemplate/docs/config.html
     'type'        => 'textarea',
   },
 
+  {
+    'key'         => 'vpopmailrestart',
+    'section'     => 'mail',
+    'description' => 'If defined, the shell commands to run on vpopmail machines after files are copied.  An example can be found in eg/vpopmailrestart of the source distribution.',
+    'type'        => 'textarea',
+  },
+
+  {
+    'key'         => 'safe-part_pkg',
+    'section'     => 'UI',
+    'description' => 'Validates package definition setup and recur expressions against a preset list.  Useful for webdemos, annoying to powerusers.',
+    'type'        => 'checkbox',
+  },
+
+  {
+    'key'         => 'safe-part_bill_event',
+    'section'     => 'UI',
+    'description' => 'Validates invoice event expressions against a preset list.  Useful for webdemos, annoying to powerusers.',
+    'type'        => 'checkbox',
+  },
+
+  {
+    'key'         => 'show_ss',
+    'section'     => 'UI',
+    'description' => 'Turns on display/collection of SS# in the web interface.',
+    'type'        => 'checkbox',
+  },
+
+  { 
+    'key'         => 'agent_defaultpkg',
+    'section'     => 'UI',
+    'description' => 'Setting this option will cause new packages to be available to all agent types by default.',
+    'type'        => 'checkbox',
+  },
+
+  {
+    'key'         => 'legacy_link',
+    'section'     => 'UI',
+    'description' => 'Display options in the web interface to link legacy pre-Freeside services.',
+    'type'        => 'checkbox',
+  },
+
 );
 
 1;