Difference between revisions of "SiteConfig"

From Request Tracker Wiki
Jump to navigation Jump to search
m (6 revisions imported)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
= What It Is =
= What It Is =


The '''Site''''''Config''' file lives in ${RTHOME}/etc/RT_SiteConfig.pm. Its purpose is to provide you a place to override config settings in ${RTHOME}/etc/RT_Config.pm as well as add new config variables as provided by various user [[Contributions]] or for your own purposes. You set a config variable like so:
The '''SiteConfig''' file lives in <code>${RTHOME}/etc/RT_SiteConfig.pm</code>. Its purpose is to provide you a place to override config settings in <code>${RTHOME}/etc/RT_Config.pm</code> as well as add new config variables as provided by various user [[Contributions]] or for your own purposes.
 
All of the available configuration options are documented in RT_Config.pm and also [http://bestpractical.com/rt/docs/latest/RT_Config.html available on the web].
 
You set a config variable like so:


  Set($Foo, "Value of Foo");
  Set($Foo, "Value of Foo");
  Set($Bar, 1);
  Set($Bar, 1);
  Set(@Baz, "array", "of", "values");                       # works properly in RT 3.8 only
  Set(@Baz, "array", "of", "values");
  Set(%Zot, "hash" =&gt; "of", "keyed" =&gt; "values"); # works properly in RT 3.8 only
  Set(%Zot, "hash" =&gt; "of", "keyed" =&gt; "values");
 
The following works in earlier versions of RT, but above is recommended for new things:
 
Set($Baz, ["reference", "to", "array", "of", "values"]);
Set($Zot, {"reference" =&gt; "to", "hash" =&gt; "of", "keyed" =&gt; "values"});


You access them like this in RT 3.8 and newer:
You access them like this in RT 3.8 and newer:
Line 18: Line 17:
  RT-&gt;Config-&gt;Get('Bar')  # 1
  RT-&gt;Config-&gt;Get('Bar')  # 1
  RT-&gt;Config-&gt;Get('Baz')-&gt;[0] # get option Baz that is array reference and access first element
  RT-&gt;Config-&gt;Get('Baz')-&gt;[0] # get option Baz that is array reference and access first element
For backwards compatibility with RT 3.6 you can use the following syntax:
$RT::Foo            # "Value of Foo"
$RT::Bar            # 1
$RT::Baz-&gt;[0]        # "array"
$RT::Zot-&gt;{"keyed"}  # "values"


= Plugins =
= Plugins =
Line 44: Line 36:
  ));
  ));


= Email interface =
==Custom Statuses:==
 
Options related to an email handling are described on [[EmailInterface]] page.
 
= Logging =
 
Configuring RT's, mysql's, apache's logs is described on [[LogsConfig]] page.
 
= Other config variables =
 
Here's an alphabetical list of some of the variables used by RT and what they do; please feel free to add more or document better.
 
$'''Auto''''''Create''' (hash reference)
 
Attributes for autocreated accounts; used only in share/html/autohandler when $RT::WebExternalAuth and $RT::WebExternalAuto are set.
 
Set($AutoCreate, {Privileged =&gt; 1, WorkPhone =&gt; 'x900'});
 
Note: "Privileged =&gt; 1" does not appear to work at present. All auto-created users are unprivileged, and therefore do not show up in the "Configuration -&gt; Users" list, and obviously do not have privileged status in the system either.


This issue has been reported: http://issues.bestpractical.com/Ticket/Display.html?id=14472
RT 4 and after: [http://bestpractical.com/rt/docs/4.0/customizing/lifecycles.html Lifecycles]
 
$'''Min''''''Password''''''Length''' (scalar)
 
MinPasswordLength lets you set a minimum password length for your users.
 
$'''rtname''' (scalar)
 
rtname lets you set name of your RT instance. See also [[EmailInterface]] and [[RenameInstance]].
 
==Custom Statuses:==


RT 3.8 and prior: [[CustomStatuses]]
RT 3.8 and prior: [[CustomStatuses]]
RT4 and after: [[CustomStatusesInRt4]]
= To Be Documented =
Hey, common! Make a step and document this.
$RT::WebExternalAuto (autohandler)
$RT::WebExternalGecos (autohandler)
$RT::WebFallbackToInternalAuth (autohandler)
$RT::WebExternalOnly (autohandler)
$RT::WebExternalAuth (autohandler)
  $RT::LdapServer (WebExternalAuth Parameter)
  $RT::LdapUser (WebExternalAuth Parameter)
  $RT::LdapPass (WebExternalAuth Parameter)
  $RT::LdapBase (WebExternalAuth Parameter)
  $RT::LdapUidAttr (WebExternalAuth Parameter)
  $RT::LdapFilter (WebExternalAuth Parameter)
  $RT::LdapTLS (WebExternalAuth Parameter)
  $RT::LdapGroup (WebExternalAuth Parameter)
  $RT::LdapGroupAttribute (WebExternalAuth Parameter)
  $RT::LdapSSLVersion (WebExternalAuth Parameter)

Latest revision as of 15:37, 6 April 2016

What It Is

The SiteConfig file lives in ${RTHOME}/etc/RT_SiteConfig.pm. Its purpose is to provide you a place to override config settings in ${RTHOME}/etc/RT_Config.pm as well as add new config variables as provided by various user Contributions or for your own purposes.

All of the available configuration options are documented in RT_Config.pm and also available on the web.

You set a config variable like so:

Set($Foo, "Value of Foo");
Set($Bar, 1);
Set(@Baz, "array", "of", "values");
Set(%Zot, "hash" => "of", "keyed" => "values");

You access them like this in RT 3.8 and newer:

RT->Config->Get('Foo') # "Value of option Foo"
RT->Config->Get('Bar')  # 1
RT->Config->Get('Baz')->[0] # get option Baz that is array reference and access first element

Plugins

Set(@Plugins, qw(RT::Extension::ResetPassword RT::Extension::MandatorySubject));

The following is an invalid way to define extensions as each declaration will override the previous:

Set(@Plugins, qw(Extension::QuickDelete));
Set(@Plugins, qw(RT::Extension::ResetPassword));
Set(@Plugins, qw(RT::Extension::MandatorySubject));

Note there are only spaces between the (full) extension name and any spaces are allowed, so the following is also valid:

Set(@Plugins, qw(
   RT::Extension::ResetPassword
   RT::Extension::MandatorySubject
   RT::Extension::QuickDelete
));

Custom Statuses:

RT 4 and after: Lifecycles

RT 3.8 and prior: CustomStatuses