Advertisement
Guest User

Untitled

a guest
Sep 16th, 2013
527
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 75.66 KB | None | 0 0
  1.  
  2. # Kernel/Config/Defaults.pm - Default Config file for OTRS kernel
  3. # Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
  4. # --
  5. # This software comes with ABSOLUTELY NO WARRANTY. For details, see
  6. # the enclosed file COPYING for license information (AGPL). If you
  7. # did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
  8. # --
  9. #
  10. # Note:
  11. # -->> Don't edit this file! Copy your needed settings into
  12. # Kernel/Config.pm. Kernel/Config.pm will not be updated. <<--
  13. #
  14. # -->> All changes of this file will be lost after an update! <<--
  15. #
  16. # --
  17.  
  18. package Kernel::Config::Defaults;
  19.  
  20. use strict;
  21. use warnings;
  22. use utf8;
  23.  
  24. # Perl 5.8.6 is the required minimum version to use OTRS.
  25. # Do not use require VERSION as it leaks variables.
  26. use 5.008_006;
  27.  
  28. # prepend '../Custom', '../Kernel/cpan-lib' and '../' to the module search path @INC
  29. use File::Basename;
  30. use FindBin qw($Bin);
  31. use lib dirname($Bin);
  32. use lib dirname($Bin) . '/Kernel/cpan-lib';
  33. use lib dirname($Bin) . '/Custom';
  34.  
  35. use File::stat;
  36. use Digest::MD5;
  37.  
  38. sub LoadDefaults {
  39. my $Self = shift;
  40.  
  41. # --------------------------------------------------- #
  42. # system data #
  43. # --------------------------------------------------- #
  44. # SecureMode
  45. # Disables the use of web-installer (installer.pl).
  46. # GenericAgent, PackageManager and SQL Box can only be used if SecureMode is enabled.
  47. $Self->{SecureMode} = 0;
  48.  
  49. # SystemID
  50. # (The identify of the system. Each ticket number and
  51. # each http session id starts with this number)
  52. $Self->{SystemID} = 10;
  53.  
  54. # FQDN
  55. # (Full qualified domain name of your system.)
  56. $Self->{FQDN} = 'yourhost.example.com';
  57.  
  58. # HttpType
  59. # In case you use https instead of plain http specify it here
  60. $Self->{HttpType} = 'http';
  61.  
  62. # ScriptAlias
  63. # Prefix to index.pl used as ScriptAlias in web config
  64. # (Used when emailing links to agents).
  65. $Self->{ScriptAlias} = 'otrs/';
  66.  
  67. # AdminEmail
  68. # (Email of the system admin.)
  69. $Self->{AdminEmail} = 'admin@example.com';
  70.  
  71. # Organization
  72. # (If this is anything other than '', then the email will have an
  73. # Organization X-Header)
  74. # $Self->{Organization} = 'Example Company';
  75. $Self->{Organization} = '';
  76.  
  77. # ProductName
  78. # (Application name displayed in frontend.)
  79. $Self->{ProductName} = 'OTRS';
  80.  
  81. # --------------------------------------------------- #
  82. # database settings #
  83. # --------------------------------------------------- #
  84. # DatabaseHost
  85. # (The database host.)
  86. $Self->{DatabaseHost} = 'localhost';
  87.  
  88. # Database
  89. # (The database name.)
  90. $Self->{Database} = 'otrs';
  91.  
  92. # DatabaseUser
  93. # (The database user.)
  94. $Self->{DatabaseUser} = 'otrs';
  95.  
  96. # DatabasePw
  97. # (The password of database user.)
  98. $Self->{DatabasePw} = 'some-pass';
  99.  
  100. # DatabaseDSN
  101. # (The database DSN for MySQL ==> more: "man DBD::mysql")
  102. $Self->{DatabaseDSN} = "DBI:mysql:database=<OTRS_CONFIG_Database>;host=<OTRS_CONFIG_DatabaseHost>;";
  103.  
  104. # (The database DSN for PostgreSQL ==> more: "man DBD::Pg")
  105. # $Self->{DatabaseDSN} = "DBI:Pg:dbname=<OTRS_CONFIG_Database>;host=<OTRS_CONFIG_DatabaseHost>;";
  106.  
  107. # (The database DSN for DBI:ODBC ==> more: "man DBD::ODBC")
  108. # $Self->{DatabaseDSN} = "DBI:ODBC:$Self->{Database}";
  109. # If you use ODBC, no database auto detection is possible,
  110. # so set the database type here. Possible: mysq,postgresql,mssql,oracle
  111. # $Self->{'Database::Type'} = 'mssql';
  112.  
  113. # (The database DSN for Oracle ==> more: "man DBD::oracle")
  114. # $Self->{DatabaseDSN} = "DBI:Oracle:sid=$Self->{Database};host=$Self->{DatabaseHost};port=1521;";
  115. # $Self->{DatabaseDSN} = "DBI:Oracle:sid=vingador;host=vingador;port=1521;";
  116. # if needed, oracle env settings
  117. # $ENV{ORACLE_HOME} = '/opt/ora9/product/9.2';
  118. # $ENV{ORACLE_HOME} = '/oracle/Ora92';
  119. # $ENV{NLS_DATE_FORMAT} = 'YYYY-MM-DD HH24:MI:SS';
  120. # $ENV{NLS_LANG} = "german_germany.utf8";
  121. # $ENV{NLS_LANG} = "german_germany.we8iso8859p15";
  122. # $ENV{NLS_LANG} = "american_america.we8iso8859p1";
  123.  
  124. # If you want to use an init sql after connect, use this here.
  125. # (e. g. can be used for mysql encoding between client and server)
  126. # $Self->{'Database::Connect'} = 'SET NAMES utf8';
  127.  
  128. # If you want to use the sql slow log feature, enable this here.
  129. # (To log every sql query which takes longer the 4 sec.)
  130. # $Self->{'Database::SlowLog'} = 0;
  131.  
  132. # --------------------------------------------------- #
  133. # default values #
  134. # (default values for GUIs) #
  135. # --------------------------------------------------- #
  136. # default valid
  137. $Self->{DefaultValid} = 'valid';
  138.  
  139. # DEPRECATED. Compatibilty setting for older 3.0 code.
  140. # Internal charset must always be utf-8.
  141. $Self->{DefaultCharset} = 'utf-8';
  142.  
  143. # default language
  144. # (the default frontend language) [default: en]
  145. $Self->{DefaultLanguage} = 'en';
  146.  
  147. # used languages
  148. # (short name = long name and file)
  149. $Self->{DefaultUsedLanguages} = {
  150. ar_SA => 'Arabic (Saudi Arabia)',
  151. bg => 'Bulgarian (&#x0411;&#x044a;&#x043b;&#x0433;&#x0430;&#x0440;&#x0441;&#x043a;&#x0438;)',
  152. ca => 'Catal&agrave;',
  153. cs => 'Czech (&#x010c;esky)',
  154. da => 'Dansk',
  155. de => 'Deutsch',
  156. en => 'English (United States)',
  157. en_CA => 'English (Canada)',
  158. en_GB => 'English (United Kingdom)',
  159. el => 'Greek (&#x0395;&#x03bb;&#x03bb;&#x03b7;&#x03bd;&#x03b9;&#x03ba;&#x03ac;)',
  160. es => 'Espa&ntilde;ol',
  161. es_CO => 'Espa&ntilde;ol (Colombia)',
  162. es_MX => 'Espa&ntilde;ol (M&eacute;xico)',
  163. et => 'Eesti',
  164. fa => 'Persian (&#x0641;&#x0627;&#x0631;&#x0633;&#x0649;)',
  165. fr => 'Fran&ccedil;ais',
  166. fr_CA => 'Fran&ccedil;ais (Canada)',
  167. fi => 'Suomi',
  168. hi => 'Hindi',
  169. hr => 'Hrvatski',
  170. hu => 'Magyar',
  171. it => 'Italiano',
  172. ja => 'Japanese (&#x65e5;&#x672c;&#x8a9e)',
  173. lt => 'Lietuvi&#371; kalba',
  174. lv => 'Latvijas',
  175. ms => 'Malay',
  176. nl => 'Nederlands',
  177. nb_NO => 'Norsk bokm&aring;l',
  178. pt_BR => 'Portugu&ecirc;s Brasileiro',
  179. pt => 'Portugu&ecirc;s',
  180. pl => 'Polski',
  181. ru => 'Russian (&#x0420;&#x0443;&#x0441;&#x0441;&#x043a;&#x0438;&#x0439;)',
  182. sl => 'Slovenian (Sloven&#x0161;&#x010d;ina)',
  183. sk_SK => 'Slovak (Sloven&#x010d;ina)',
  184. sr_Cyrl => 'Serbian Latin (Srpski)',
  185. sr_Latn => 'Serbian Cyrillic (&#1089;&#1088;&#1087;&#1089;&#1082;&#1080;)',
  186. sv => 'Svenska',
  187. tr => 'T&uuml;rk&ccedil;e',
  188. uk => 'Ukrainian (&#x0423;&#x043a;&#x0440;&#x0430;&#x0457;&#x043d;&#x0441;&#x044c;&#x043a;&#x0430;)',
  189. vi_VN => 'Vietnam (Vi&#x0246;t Nam)',
  190. zh_CN => 'Chinese (Sim.) (&#x7b80;&#x4f53;&#x4e2d;&#x6587;)',
  191. zh_TW => 'Chinese (Tradi.) (&#x6b63;&#x9ad4;&#x4e2d;&#x6587;)',
  192.  
  193. # th => 'Thai (&#x0e44;&#x0e17;&#x0e22;)',
  194. # ro => 'Rom&acirc;n&auml;',
  195. # hr => 'Croatian',
  196. # jp => 'Japanese (&#x65e5;&#x672c;&#x8a9e;)',
  197. };
  198.  
  199. # default theme
  200. # (the default html theme) [default: Standard]
  201. $Self->{DefaultTheme} = 'Standard';
  202.  
  203. # DefaultTheme::HostBased
  204. # (set theme based on host name)
  205. # $Self->{'DefaultTheme::HostBased'} = {
  206. # 'host1\.example\.com' => 'SomeTheme1',
  207. # 'host2\.example\.com' => 'SomeTheme1',
  208. # };
  209.  
  210. # Frontend::WebPath
  211. # (URL base path of icons, CSS and Java Script.)
  212. $Self->{'Frontend::WebPath'} = '/otrs-web/';
  213.  
  214. # Frontend::JavaScriptPath
  215. # (URL JavaScript path.)
  216. $Self->{'Frontend::JavaScriptPath'} = '<OTRS_CONFIG_Frontend::WebPath>js/';
  217.  
  218. # Frontend::CSSPath
  219. # (URL CSS path.)
  220. $Self->{'Frontend::CSSPath'} = '<OTRS_CONFIG_Frontend::WebPath>css/';
  221.  
  222. # Frontend::ImagePath
  223. # (URL image path of icons for navigation.)
  224. $Self->{'Frontend::ImagePath'} = '<OTRS_CONFIG_Frontend::WebPath>skins/Agent/default/img/';
  225.  
  226. # DefaultViewNewLine
  227. # (insert new line in text messages after max x chars and
  228. # the next word)
  229. $Self->{DefaultViewNewLine} = 90;
  230.  
  231. # DefaultViewLines
  232. # (Max viewable lines in text messages (like ticket lines
  233. # in QueueZoom)
  234. $Self->{DefaultViewLines} = 6000;
  235.  
  236. # ShowAlwaysLongTime
  237. # (show always time in long /days hours minutes/ or short
  238. # /days hours/ format)
  239. $Self->{ShowAlwaysLongTime} = 0;
  240. $Self->{TimeShowAlwaysLong} = 0;
  241.  
  242. # TimeInputFormat
  243. # (default date input format) [Option|Input]
  244. $Self->{TimeInputFormat} = 'Option';
  245.  
  246. # AttachmentDownloadType
  247. # (if the tickets attachments will be opened in browser or just to
  248. # force the download) [attachment|inline]
  249. # $Self->{'AttachmentDownloadType'} = 'inline';
  250. $Self->{AttachmentDownloadType} = 'attachment';
  251.  
  252. # --------------------------------------------------- #
  253. # Check Settings
  254. # --------------------------------------------------- #
  255. # CheckEmailAddresses
  256. # (Check syntax of used email addresses)
  257. $Self->{CheckEmailAddresses} = 1;
  258.  
  259. # CheckMXRecord
  260. # (Check mx recorde of used email addresses)
  261. $Self->{CheckMXRecord} = 1;
  262.  
  263. # CheckEmailValidAddress
  264. # (regexp of valid email addresses)
  265. $Self->{CheckEmailValidAddress} = '^(root@localhost|admin@localhost)$';
  266.  
  267. # CheckEmailInvalidAddress
  268. # (regexp of invalid email addresses)
  269. $Self->{CheckEmailInvalidAddress} = '@(example)\.(..|...)$';
  270.  
  271. # --------------------------------------------------- #
  272. # LogModule #
  273. # --------------------------------------------------- #
  274. # (log backend module)
  275. $Self->{LogModule} = 'Kernel::System::Log::SysLog';
  276.  
  277. # $Self->{'LogModule'} = 'Kernel::System::Log::File';
  278.  
  279. # param for LogModule Kernel::System::Log::SysLog
  280. $Self->{'LogModule::SysLog::Facility'} = 'user';
  281.  
  282. # param for LogModule Kernel::System::Log::SysLog
  283. # (Depends on you sys log system environment. 'unix' is default, on
  284. # solaris you may need to use 'stream'.)
  285. $Self->{'LogModule::SysLog::LogSock'} = 'unix';
  286.  
  287. # param for LogModule Kernel::System::Log::SysLog
  288. # (if syslog can't work with utf-8, force the log
  289. # charset with this option, on other chars will be
  290. # replaces with ?)
  291. $Self->{'LogModule::SysLog::Charset'} = 'iso-8859-15';
  292.  
  293. # $Self->{'LogModule::SysLog::Charset'} = 'utf-8';
  294.  
  295. # param for LogModule Kernel::System::Log::File (required!)
  296. $Self->{'LogModule::LogFile'} = '/tmp/otrs.log';
  297.  
  298. # param if the date (yyyy-mm) should be added as suffix to
  299. # logfile [0|1]
  300. # $Self->{'LogModule::LogFile::Date'} = 0;
  301.  
  302. # system log cache size for admin system log (default 32k)
  303. # $Self->{'LogSystemCacheSize'} = 32 * 1024;
  304.  
  305. # --------------------------------------------------- #
  306. # SendmailModule
  307. # --------------------------------------------------- #
  308. # (Where is sendmail located and some options.
  309. # See 'man sendmail' for details. Or use the SMTP backend.)
  310. $Self->{SendmailModule} = 'Kernel::System::Email::Sendmail';
  311. $Self->{'SendmailModule::CMD'} = '/usr/sbin/sendmail -i -f ';
  312.  
  313. # $Self->{'SendmailModule'} = 'Kernel::System::Email::SMTP';
  314. # $Self->{'SendmailModule::Host'} = 'mail.example.com';
  315. # $Self->{'SendmailModule::Port'} = '25';
  316. # $Self->{'SendmailModule::AuthUser'} = '';
  317. # $Self->{'SendmailModule::AuthPassword'} = '';
  318.  
  319. # SendmailBcc
  320. # (Send all outgoing email via bcc to...
  321. # Warning: use it only for external archive functions)
  322. $Self->{SendmailBcc} = '';
  323.  
  324. # SendmailNotificationEnvelopeFrom
  325. # Set a email address that is used as envelope from header in outgoing
  326. # notifications
  327. # $Self->{'SendmailNotificationEnvelopeFrom'} = '';
  328.  
  329. # --------------------------------------------------- #
  330. # authentication settings #
  331. # (enable what you need, auth against otrs db, #
  332. # against LDAP directory, agains HTTP basic auth #
  333. # or against Radius server) #
  334. # --------------------------------------------------- #
  335. # This is the auth. module againt the otrs db
  336. # $Self->{AuthModule} = 'Kernel::System::Auth::DB';
  337.  
  338. # defines AuthSyncBackend (AuthSyncModule) for AuthModule
  339. # if this key exists and is empty, there won't be a sync.
  340. # example values: AuthSyncBackend, AuthSyncBackend2
  341. # $Self->{'AuthModule::UseSyncBackend'} = '';
  342.  
  343. # password crypt type (sha2|sha1|md5|crypt|plain)
  344. # $Self->{'AuthModule::DB::CryptType'} = 'md5';
  345.  
  346. # This is an example configuration for an LDAP auth. backend.
  347. # (take care that Net::LDAP is installed!)
  348. $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
  349. $Self->{'AuthModule::LDAP::Host'} = 'nameAD';
  350. $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=moidomen,dc=lcl';
  351. $Self->{'AuthModule::LDAP::UID'} = 'otrsadmin';
  352. $Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=otrsadmin,OU=OTRS,dc=moidomen,dc=lcl';
  353. $Self->{'AuthModule::LDAP::SearchUserPw'} = '12345678';
  354.  
  355. # Check if the user is allowed to auth in a posixGroup
  356. # (e. g. user needs to be in a group xyz to use otrs)
  357. # $Self->{'AuthModule::LDAP::GroupDN'} = 'cn=otrsallow,ou=posixGroups,dc=example,dc=com';
  358. # $Self->{'AuthModule::LDAP::AccessAttr'} = 'memberUid';
  359. # for ldap posixGroups objectclass (just uid)
  360. # $Self->{'AuthModule::LDAP::UserAttr'} = 'UID';
  361. # for non ldap posixGroups objectclass (with full user dn)
  362. # $Self->{'AuthModule::LDAP::UserAttr'} = 'DN';
  363.  
  364. # The following is valid but would only be necessary if the
  365. # anonymous user do NOT have permission to read from the LDAP tree
  366.  
  367. # in case you want to add always one filter to each ldap query, use
  368. # this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
  369. # $Self->{'AuthModule::LDAP::AlwaysFilter'} = '';
  370.  
  371. # in case you want to add a suffix to each login name, then
  372. # you can use this option. e. g. user just want to use user but
  373. # in your ldap directory exists user@domain.
  374. # $Self->{'AuthModule::LDAP::UserSuffix'} = '@domain.com';
  375.  
  376. # In case you want to convert all given usernames to lower letters you
  377. # should activate this option. It might be helpfull if databases are
  378. # in use that do not distinguish selects for upper and lower case letters
  379. # (Oracle, postgresql). User might be synched twice, if this option
  380. # is not in use.
  381. # $Self->{'AuthModule::LDAP::UserLowerCase'} = 0;
  382.  
  383. # In case you need to use OTRS in iso-charset, you can define this
  384. # by using this option (converts utf-8 data from LDAP to iso).
  385. # $Self->{'AuthModule::LDAP::Charset'} = 'iso-8859-1';
  386.  
  387. # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
  388. # $Self->{'AuthModule::LDAP::Params'} = {
  389. # port => 389,
  390. # timeout => 120,
  391. # async => 0,
  392. # version => 3,
  393. # };
  394.  
  395. # Die if backend can't work, e. g. can't connect to server.
  396. # $Self->{'AuthModule::LDAP::Die'} = 1;
  397.  
  398. # This is an example configuration for an apache ($ENV{REMOTE_USER})
  399. # auth. backend. Use it if you want to have a singe login through
  400. # apache http-basic-auth.
  401. # $Self->{AuthModule} = 'Kernel::System::Auth::HTTPBasicAuth';
  402. # In case there is a leading domain in the REMOTE_USER, you can
  403. # replace it by the next config option.
  404. # $Self->{'AuthModule::HTTPBasicAuth::Replace'} = 'example_domain\\';
  405. # In case you need to replace some part of the REMOTE_USER, you can
  406. # use the following RegExp ($1 will be new login).
  407. # $Self->{'AuthModule::HTTPBasicAuth::ReplaceRegExp'} = '^(.+?)@.+?$';
  408. # Note:
  409. # If you use this module, you should use as fallback the following
  410. # config settings if user isn't login through apache ($ENV{REMOTE_USER}).
  411. # $Self->{LoginURL} = 'http://host.example.com/not-authorised-for-otrs.html';
  412. # $Self->{LogoutURL} = 'http://host.example.com/thanks-for-using-otrs.html';
  413.  
  414. # This is example configuration to auth. agents against a radius server.
  415. # $Self->{'AuthModule'} = 'Kernel::System::Auth::Radius';
  416. # $Self->{'AuthModule::Radius::Host'} = 'radiushost';
  417. # $Self->{'AuthModule::Radius::Password'} = 'radiussecret';
  418.  
  419. # Die if backend can't work, e. g. can't connect to server.
  420. # $Self->{'AuthModule::Radius::Die'} = 1;
  421.  
  422. # --------------------------------------------------- #
  423. # authentication sync settings #
  424. # (enable agent data sync. after succsessful #
  425. # authentication) #
  426. # --------------------------------------------------- #
  427. # This is an example configuration for an LDAP auth sync. backend.
  428. # (take care that Net::LDAP is installed!)
  429. $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
  430. $Self->{'AuthSyncModule::LDAP::Host'} = 'nameAD';
  431. $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=moidomen,dc=lcl';
  432. $Self->{'AuthSyncModule::LDAP::UID'} = 'otrsadmin';
  433. $Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'member';
  434.  
  435. # The following is valid but would only be necessary if the
  436. # anonymous user do NOT have permission to read from the LDAP tree
  437. $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'CN=otrsdmin,OU=OTRS,dc=moidomen,dc=lcl';
  438. $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = '12345678';
  439.  
  440. # in case you want to add always one filter to each ldap query, use
  441. # this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
  442. # $Self->{'AuthSyncModule::LDAP::AlwaysFilter'} = '';
  443.  
  444. # AuthSyncModule::LDAP::UserSyncMap
  445. # (map if agent should create/synced from LDAP to DB after successful login)
  446. $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
  447. # # DB -> LDAP
  448. UserFirstname => 'givenName',
  449. UserLastname => 'sn',
  450. UserEmail => 'mail',
  451. };
  452.  
  453. # In case you need to use OTRS in iso-charset, you can define this
  454. # by using this option (converts utf-8 data from LDAP to iso).
  455. # $Self->{'AuthSyncModule::LDAP::Charset'} = 'iso-8859-1';
  456.  
  457. # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
  458. # $Self->{'AuthSyncModule::LDAP::Params'} = {
  459. # port => 389,
  460. # timeout => 120,
  461. # async => 0,
  462. # version => 3,
  463. # };
  464.  
  465. # Die if backend can't work, e. g. can't connect to server.
  466. # $Self->{'AuthSyncModule::LDAP::Die'} = 1;
  467.  
  468. # Attributes needed for group syncs
  469. # (attribute name for group value key)
  470. # $Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'memberUid';
  471. # (attribute for type of group content UID/DN for full ldap name)
  472. # $Self->{'AuthSyncModule::LDAP::UserAttr'} = 'UID';
  473. # $Self->{'AuthSyncModule::LDAP::UserAttr'} = 'DN';
  474.  
  475. # AuthSyncModule::LDAP::UserSyncInitialGroups
  476. # (sync following group with rw permission after initial create of first agent
  477. # login)
  478. $Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
  479. 'users',
  480. ];
  481.  
  482. # AuthSyncModule::LDAP::UserSyncGroupsDefinition
  483. # (If "LDAP" was selected for AuthModule and you want to sync LDAP
  484. # groups to otrs groups, define the following.)
  485. # $Self->{'AuthSyncModule::LDAP::UserSyncGroupsDefinition'} = {
  486. # # ldap group
  487. # 'cn=agent,o=otrs' => {
  488. # # otrs group
  489. # 'admin' => {
  490. # # permission
  491. # rw => 1,
  492. # ro => 1,
  493. # },
  494. # 'faq' => {
  495. # rw => 0,
  496. # ro => 1,
  497. # },
  498. # },
  499. # 'cn=agent2,o=otrs' => {
  500. # 'users' => {
  501. # rw => 1,
  502. # ro => 1,
  503. # },
  504. # }
  505. # };
  506.  
  507. # AuthSyncModule::LDAP::UserSyncRolesDefinition
  508. # (If "LDAP" was selected for AuthModule and you want to sync LDAP
  509. # groups to otrs roles, define the following.)
  510. # $Self->{'AuthSyncModule::LDAP::UserSyncRolesDefinition'} = {
  511. # # ldap group
  512. # 'cn=agent,o=otrs' => {
  513. # # otrs role
  514. # 'role1' => 1,
  515. # 'role2' => 0,
  516. # },
  517. # 'cn=agent2,o=otrs' => {
  518. # 'role3' => 1,
  519. # }
  520. # };
  521.  
  522. # AuthSyncModule::LDAP::UserSyncAttributeGroupsDefinition
  523. # (If "LDAP" was selected for AuthModule and you want to sync LDAP
  524. # attributes to otrs groups, define the following.)
  525. # $Self->{'AuthSyncModule::LDAP::UserSyncAttributeGroupsDefinition'} = {
  526. # # ldap attribute
  527. # 'LDAPAttribute' => {
  528. # # ldap attribute value
  529. # 'LDAPAttributeValue1' => {
  530. # # otrs group
  531. # 'admin' => {
  532. # # permission
  533. # rw => 1,
  534. # ro => 1,
  535. # },
  536. # 'faq' => {
  537. # rw => 0,
  538. # ro => 1,
  539. # },
  540. # },
  541. # },
  542. # 'LDAPAttribute2' => {
  543. # 'LDAPAttributeValue' => {
  544. # 'users' => {
  545. # rw => 1,
  546. # ro => 1,
  547. # },
  548. # },
  549. # }
  550. # };
  551.  
  552. # AuthSyncModule::LDAP::UserSyncAttributeRolesDefinition
  553. # (If "LDAP" was selected for AuthModule and you want to sync LDAP
  554. # attributes to otrs roles, define the following.)
  555. # $Self->{'AuthSyncModule::LDAP::UserSyncAttributeRolesDefinition'} = {
  556. # # ldap attribute
  557. # 'LDAPAttribute' => {
  558. # # ldap attribute value
  559. # 'LDAPAttributeValue1' => {
  560. # # otrs role
  561. # 'role1' => 1,
  562. # 'role2' => 1,
  563. # },
  564. # },
  565. # 'LDAPAttribute2' => {
  566. # 'LDAPAttributeValue1' => {
  567. # 'role3' => 1,
  568. # },
  569. # },
  570. # };
  571.  
  572. # UserTable
  573. $Self->{DatabaseUserTable} = 'users';
  574. $Self->{DatabaseUserTableUserID} = 'id';
  575. $Self->{DatabaseUserTableUserPW} = 'pw';
  576. $Self->{DatabaseUserTableUser} = 'login';
  577.  
  578. # --------------------------------------------------- #
  579. # URL login and logout settings #
  580. # --------------------------------------------------- #
  581.  
  582. # LoginURL
  583. # (If this is anything other than '', then it is assumed to be the
  584. # URL of an alternate login screen which will be used in place of
  585. # the default one.)
  586. # $Self->{LoginURL} = '';
  587. # $Self->{LoginURL} = 'http://host.example.com/cgi-bin/login.pl';
  588.  
  589. # LogoutURL
  590. # (If this is anything other than '', it is assumed to be the URL
  591. # of an alternate logout page which users will be sent to when they
  592. # logout.)
  593. # $Self->{LogoutURL} = '';
  594. # $Self->{LogoutURL} = 'http://host.example.com/cgi-bin/login.pl';
  595.  
  596. # PreApplicationModule
  597. # (Used for every request, if defined, the PreRun() function of
  598. # this module will be used. This interface use useful to check
  599. # some user options or to redirect not accept new application
  600. # news)
  601. # $Self->{PreApplicationModule}->{AgentInfo} = 'Kernel::Modules::AgentInfo';
  602. # Kernel::Modules::AgentInfo check key, if this user preferences key
  603. # is true, then the message is already accepted
  604. # $Self->{InfoKey} = 'wpt22';
  605. # shown InfoFile located under Kernel/Output/HTML/Standard/AgentInfo.dtl
  606. # $Self->{InfoFile} = 'AgentInfo';
  607.  
  608. # --------------------------------------------------- #
  609. # Notification Settings
  610. # --------------------------------------------------- #
  611.  
  612. # agent interface notification module to check the admin user id
  613. # (don't work with user id 1 notification)
  614. $Self->{'Frontend::NotifyModule'}->{'200-UID-Check'} = {
  615. Module => 'Kernel::Output::HTML::NotificationUIDCheck',
  616. };
  617.  
  618. # show online agents
  619. # $Self->{'Frontend::NotifyModule'}->{'3-ShowAgentOnline'} = {
  620. # Module => 'Kernel::Output::HTML::NotificationAgentOnline',
  621. # ShowEmail => 1,
  622. # IdleMinutes => 60,
  623. # };
  624. # show online customers
  625. # $Self->{'Frontend::NotifyModule'}->{'4-ShowCustomerOnline'} = {
  626. # Module => 'Kernel::Output::HTML::NotificationCustomerOnline',
  627. # ShowEmail => 1,
  628. # IdleMinutes => 60,
  629. # };
  630.  
  631. # --------------------------------------------------- #
  632. # #
  633. # Start of config options!!! #
  634. # Session stuff #
  635. # #
  636. # --------------------------------------------------- #
  637.  
  638. # --------------------------------------------------- #
  639. # SessionModule #
  640. # --------------------------------------------------- #
  641. # (How should be the session-data stored?
  642. # Advantage of DB is that you can split the
  643. # Frontendserver from the db-server. fs is faster.)
  644. $Self->{SessionModule} = 'Kernel::System::AuthSession::DB';
  645.  
  646. # $Self->{SessionModule} = 'Kernel::System::AuthSession::FS';
  647.  
  648. # SessionName
  649. # (Name of the session key. E. g. Session, SessionID, OTRS)
  650. $Self->{SessionName} = 'Session';
  651.  
  652. # SessionCheckRemoteIP
  653. # (If the application is used via a proxy-farm then the
  654. # remote ip address is mostly different. In this case,
  655. # turn of the CheckRemoteID. ) [1|0]
  656. $Self->{SessionCheckRemoteIP} = 1;
  657.  
  658. # SessionDeleteIfNotRemoteID
  659. # (Delete session if the session id is used with an
  660. # invalied remote IP?) [0|1]
  661. $Self->{SessionDeleteIfNotRemoteID} = 1;
  662.  
  663. # SessionMaxTime
  664. # (Max valid time of one session id in second (8h = 28800).)
  665. $Self->{SessionMaxTime} = 16 * 60 * 60;
  666.  
  667. # SessionMaxIdleTime
  668. # (After this time (in seconds) without new http request, then
  669. # the user get logged off)
  670. $Self->{SessionMaxIdleTime} = 6 * 60 * 60;
  671.  
  672. # SessionDeleteIfTimeToOld
  673. # (Delete session's witch are requested and to old?) [0|1]
  674. $Self->{SessionDeleteIfTimeToOld} = 1;
  675.  
  676. # SessionUseCookie
  677. # (Should the session management use html cookies?
  678. # It's more comfortable to send links -==> if you have a valid
  679. # session, you don't have to login again.) [0|1]
  680. # Note: If the client browser disabled html cookies, the system
  681. # will work as usual, append SessionID to links!
  682. $Self->{SessionUseCookie} = 1;
  683.  
  684. # SessionUseCookieAfterBrowserClose
  685. # (store cookies in browser after closing a browser) [0|1]
  686. $Self->{SessionUseCookieAfterBrowserClose} = 0;
  687.  
  688. # SessionDir
  689. # directory for all sessen id information (just needed if
  690. # $Self->{SessionModule}='Kernel::System::AuthSession::FS)
  691. $Self->{SessionDir} = '<OTRS_CONFIG_Home>/var/sessions';
  692.  
  693. # SessionTable*
  694. # (just needed if $Self->{SessionModule}='Kernel::System::AuthSession::DB)
  695. # SessionTable
  696. $Self->{SessionTable} = 'sessions';
  697.  
  698. # --------------------------------------------------- #
  699. # Time Settings
  700. # --------------------------------------------------- #
  701. # TimeZone
  702. # (set the system time zone, default is local time)
  703. # $Self->{'TimeZone'} = 0;
  704.  
  705. # Time*
  706. # (Used for ticket age, escalation and system unlock calculation)
  707.  
  708. # TimeWorkingHours
  709. # (counted hours for working time used)
  710. $Self->{TimeWorkingHours} = {
  711. Mon => [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ],
  712. Tue => [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ],
  713. Wed => [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ],
  714. Thu => [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ],
  715. Fri => [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ],
  716. Sat => [],
  717. Sun => [],
  718. };
  719.  
  720. # TimeVacationDays
  721. # adde new days with:
  722. # "$Self->{TimeVacationDays}->{10}->{27} = 'Some Info';"
  723.  
  724. $Self->{TimeVacationDays} = {
  725. 1 => { 1 => 'New Year\'s Eve!', },
  726. 5 => { 1 => '1 St. May', },
  727. 12 => {
  728. 24 => 'Christmas',
  729. 25 => 'Christmas Day',
  730. 26 => 'Boxing Day',
  731. 31 => 'Silvester',
  732. },
  733. };
  734.  
  735. # TimeVacationDaysOneTime
  736. # adde new own days with:
  737. # "$Self->{TimeVacationDaysOneTime}->{1977}-{10}->{27} = 'Some Info';"
  738.  
  739. $Self->{TimeVacationDaysOneTime} = {
  740. # 2004 => {
  741. # 6 => {
  742. # 7 => 'Some Day',
  743. # },
  744. # 12 => {
  745. # 24 => 'Some A Day',
  746. # 31 => 'Some B Day',
  747. # },
  748. # },
  749. # 2005 => {
  750. # 1 => {
  751. # 11 => 'Some Day',
  752. # },
  753. # },
  754. };
  755.  
  756. # --------------------------------------------------- #
  757. # Web Settings
  758. # --------------------------------------------------- #
  759. # WebMaxFileUpload
  760. # (Max size for browser file uploads - default ~ 24 MB)
  761. $Self->{WebMaxFileUpload} = 24000000;
  762.  
  763. # WebUploadCacheModule
  764. # (select you WebUploadCacheModule module, default DB [DB|FS])
  765. $Self->{WebUploadCacheModule} = 'Kernel::System::Web::UploadCache::DB';
  766.  
  767. # $Self->{WebUploadCacheModule} = 'Kernel::System::Web::UploadCache::FS';
  768.  
  769. # CGILogPrefix
  770. $Self->{CGILogPrefix} = 'OTRS-CGI';
  771.  
  772. # --------------------------------------------------- #
  773. # Agent Web Interface
  774. # --------------------------------------------------- #
  775. # LostPassword
  776. # (use lost password feature)
  777. $Self->{LostPassword} = 1;
  778.  
  779. # ShowMotd
  780. # (show message of the day in login screen)
  781. $Self->{ShowMotd} = 0;
  782.  
  783. # DemoSystem
  784. # (If this is true, no agent preferences, like language and theme, via agent
  785. # frontend can be updated! Just for the current session. Alow no password can
  786. # be changed on agent frontend.)
  787. $Self->{DemoSystem} = 0;
  788.  
  789. # SwitchToUser
  790. # (Allow the admin to switch into a selected user session.)
  791. $Self->{SwitchToUser} = 0;
  792.  
  793. # --------------------------------------------------- #
  794. # MIME-Viewer for online to html converter
  795. # --------------------------------------------------- #
  796. # (e. g. xlhtml (xls2html), http://chicago.sourceforge.net/xlhtml/)
  797. # $Self->{'MIME-Viewer'}->{'application/excel'} = 'xlhtml';
  798. # MIME-Viewer for online to html converter
  799. # (e. g. wv (word2html), http://wvware.sourceforge.net/)
  800. # $Self->{'MIME-Viewer'}->{'application/msword'} = 'wvWare';
  801. # (e. g. pdftohtml (pdf2html), http://pdftohtml.sourceforge.net/)
  802. # $Self->{'MIME-Viewer'}->{'application/pdf'} = 'pdftohtml -stdout -i';
  803. # (e. g. xml2html (xml2html))
  804. # $Self->{'MIME-Viewer'}->{'text/xml'} = $Self->{Home}.'/scripts/tools/xml2html.pl';
  805.  
  806. # --------------------------------------------------- #
  807. # SpellChecker
  808. # --------------------------------------------------- #
  809. # (If ispell or aspell is available, then we will provide a spelling
  810. # checker.)
  811. # $Self->{SpellChecker} = 0;
  812. $Self->{SpellChecker} = 1;
  813. $Self->{SpellCheckerBin} = '/usr/bin/ispell';
  814. $Self->{SpellCheckerDictDefault} = 'english';
  815.  
  816. # SpellCheckerIgnore
  817. # (A list of ignored words.)
  818. $Self->{SpellCheckerIgnore} = [ 'www', 'webmail', 'https', 'http', 'html', 'rfc' ];
  819.  
  820. # --------------------------------------------------- #
  821. # directories #
  822. # --------------------------------------------------- #
  823. # root directory
  824. $Self->{Home} = '/opt/otrs';
  825.  
  826. # tmp dir
  827. $Self->{TempDir} = '<OTRS_CONFIG_Home>/var/tmp';
  828.  
  829. # html template dirs
  830. $Self->{TemplateDir} = '<OTRS_CONFIG_Home>/Kernel/Output';
  831. $Self->{CustomTemplateDir} = '<OTRS_CONFIG_Home>/Custom/Kernel/Output';
  832.  
  833. # --------------------------------------------------- #
  834. # CommonCSS #
  835. # --------------------------------------------------- #
  836.  
  837. # Customer Common CSS
  838. $Self->{'Loader::Customer::CommonCSS'}->{'000-Framework'} = [
  839. 'Core.Reset.css',
  840. 'Core.Default.css',
  841. 'Core.Form.css',
  842. 'Core.Login.css',
  843. 'Core.Control.css',
  844. 'Core.Table.css',
  845. 'Core.TicketZoom.css',
  846. 'Core.Print.css'
  847. ];
  848.  
  849. # Customer Common CSS for IE7
  850. $Self->{'Loader::Customer::CommonCSS::IE7'}->{'000-Framework'} = [
  851. 'Core.IE7.css'
  852. ];
  853. # Customer Common CSS for IE8
  854. $Self->{'Loader::Customer::CommonCSS::IE8'}->{'000-Framework'} = [];
  855.  
  856. # Agent Common CSS
  857. $Self->{'Loader::Agent::CommonCSS'}->{'000-Framework'} = [
  858. 'Core.Reset.css',
  859. 'Core.Default.css',
  860. 'Core.Header.css',
  861. 'Core.OverviewControl.css',
  862. 'Core.OverviewSmall.css',
  863. 'Core.OverviewMedium.css',
  864. 'Core.OverviewLarge.css',
  865. 'Core.Footer.css',
  866. 'Core.PageLayout.css',
  867. 'Core.Form.css',
  868. 'Core.Table.css',
  869. 'Core.Widget.css',
  870. 'Core.WidgetMenu.css',
  871. 'Core.TicketDetail.css',
  872. 'Core.Tooltip.css',
  873. 'Core.Dialog.css',
  874. 'Core.Print.css'
  875. ];
  876.  
  877. # Agent Common CSS for IE8
  878. $Self->{'Loader::Agent::CommonCSS::IE8'}->{'000-Framework'} = [
  879. 'Core.OverviewSmall.IE8.css'
  880. ];
  881.  
  882. # --------------------------------------------------- #
  883. # CommonJS #
  884. # --------------------------------------------------- #
  885.  
  886. # Customer Common JS
  887. $Self->{'Loader::Customer::CommonJS'}->{'000-Framework'} = [
  888. 'thirdparty/jquery-1.6.4/jquery.js',
  889. 'thirdparty/stacktrace-0.4/stacktrace.js',
  890. 'thirdparty/jquery-pubsub/pubsub.js',
  891. 'Core.Debug.js',
  892. 'Core.Exception.js',
  893. 'Core.Config.js',
  894. 'Core.App.js',
  895. 'Core.Customer.js',
  896. 'Core.JavaScriptEnhancements.js',
  897. 'Core.UI.RichTextEditor.js'
  898. ];
  899.  
  900. # Agent Common JS
  901. $Self->{'Loader::Agent::CommonJS'}->{'000-Framework'} = [
  902. 'thirdparty/json/json2.js',
  903. 'thirdparty/jquery-1.6.4/jquery.js',
  904. 'thirdparty/jquery-ui-1.8.21/jquery-ui.js',
  905. 'thirdparty/jquery-validate-1.10/jquery.validate.js',
  906. 'thirdparty/stacktrace-0.4/stacktrace.js',
  907. 'thirdparty/jquery-pubsub/pubsub.js',
  908. 'Core.JavaScriptEnhancements.js',
  909. 'Core.Debug.js',
  910. 'Core.Data.js',
  911. 'Core.Config.js',
  912. 'Core.Exception.js',
  913. 'Core.JSON.js',
  914. 'Core.AJAX.js',
  915. 'Core.App.js',
  916. 'Core.UI.js',
  917. 'Core.UI.IE7Fixes.js',
  918. 'Core.UI.Accordion.js',
  919. 'Core.UI.Datepicker.js',
  920. 'Core.UI.Resizable.js',
  921. 'Core.UI.Table.js',
  922. 'Core.UI.Accessibility.js',
  923. 'Core.UI.RichTextEditor.js',
  924. 'Core.Form.js',
  925. 'Core.Form.ErrorTooltips.js',
  926. 'Core.UI.Dialog.js',
  927. 'Core.Form.Validate.js',
  928. 'Core.UI.ActionRow.js',
  929. 'Core.UI.Popup.js',
  930. 'Core.Agent.js'
  931. ];
  932.  
  933. # --------------------------------------------------- #
  934. # #
  935. # package management options #
  936. # #
  937. # --------------------------------------------------- #
  938.  
  939. # Package::RepositoryRoot
  940. # (get online repository list, use the fist availabe result)
  941. $Self->{'Package::RepositoryRoot'} = [
  942. 'http://ftp.otrs.org/pub/otrs/misc/packages/repository.xml',
  943. 'http://otrs.org/repository.xml',
  944. ];
  945.  
  946. # Package::RepositoryList
  947. # (repository list)
  948. # $Self->{'Package::RepositoryList'} = {
  949. # 'ftp://ftp.example.com/pub/otrs/misc/packages/' => '[Example] ftp://ftp.example.com/',
  950. # };
  951.  
  952. # Package::Timeout
  953. # (http/ftp timeout to get packages)
  954. $Self->{'Package::Timeout'} = 15;
  955.  
  956. # Package::Proxy
  957. # (fetch packages via proxy)
  958. # $Self->{'Package::Proxy'} = 'http://proxy.sn.no:8001/';
  959.  
  960. # --------------------------------------------------- #
  961. # PGP settings (supports gpg) #
  962. # --------------------------------------------------- #
  963. $Self->{PGP} = 0;
  964. $Self->{'PGP::Bin'} = '/usr/bin/gpg';
  965. $Self->{'PGP::Options'} = '--homedir /opt/otrs/.gnupg/ --batch --no-tty --yes';
  966.  
  967. # $Self->{'PGP::Options'} = '--batch --no-tty --yes';
  968. # $Self->{'PGP::Key::Password'}->{'D2DF79FA'} = 1234;
  969. # $Self->{'PGP::Key::Password'}->{'488A0B8F'} = 1234;
  970.  
  971. # --------------------------------------------------- #
  972. # S/MIME settings (supports smime) #
  973. # --------------------------------------------------- #
  974. $Self->{SMIME} = 0;
  975.  
  976. # maybe openssl need a HOME env!
  977. #$ENV{HOME} = '/var/lib/wwwrun';
  978. $Self->{'SMIME::Bin'} = '/usr/bin/openssl';
  979.  
  980. # $Self->{'SMIME::CertPath'} = '/etc/ssl/certs';
  981. # $Self->{'SMIME::PrivatePath'} = '/etc/ssl/private';
  982.  
  983. # --------------------------------------------------- #
  984. # system permissions
  985. # --------------------------------------------------- #
  986. $Self->{'System::Permission'} = [ 'ro', 'rw' ];
  987. $Self->{'System::Customer::Permission'} = [ 'ro', 'rw' ];
  988.  
  989. # --------------------------------------------------- #
  990. # #
  991. # Start of config options!!! #
  992. # Preferences stuff #
  993. # #
  994. # --------------------------------------------------- #
  995.  
  996. # PreferencesTable*
  997. # (Stored preferences table data.)
  998. $Self->{PreferencesTable} = 'user_preferences';
  999. $Self->{PreferencesTableKey} = 'preferences_key';
  1000. $Self->{PreferencesTableValue} = 'preferences_value';
  1001. $Self->{PreferencesTableUserID} = 'user_id';
  1002.  
  1003. # PreferencesView
  1004. # (Order of shown items)
  1005. $Self->{PreferencesView} = [ 'User Profile', 'Email Settings', 'Other Settings' ];
  1006.  
  1007. $Self->{PreferencesGroups}->{Password} = {
  1008. Module => 'Kernel::Output::HTML::PreferencesPassword',
  1009. Column => 'Other Options',
  1010. Label => 'Change Password',
  1011. Prio => 1000,
  1012. Area => 'Agent',
  1013.  
  1014. # PasswordRegExp => '[a-z]|[A-z]|[0-9]|\.|;|,|:|-|\+|#|!|\$|&|\?',
  1015. PasswordRegExp => '',
  1016. PasswordMinSize => 0,
  1017. PasswordMin2Lower2UpperCharacters => 0,
  1018. PasswordMin2Characters => 0,
  1019. PasswordNeedDigit => 0,
  1020. Active => 1,
  1021. };
  1022. $Self->{PreferencesGroups}->{SpellDict} = {
  1023. Module => 'Kernel::Output::HTML::PreferencesGeneric',
  1024. Column => 'Other Options',
  1025. Label => 'Spelling Dictionary',
  1026. Desc => 'Select your default spelling dictionary.',
  1027. Data => {
  1028.  
  1029. # installed dict catalog (check your insalled catalogues, e. g. deutsch -=> german!)
  1030. # dict => frontend (ispell)
  1031. 'english' => 'English',
  1032. 'deutsch' => 'Deutsch',
  1033.  
  1034. # dict => frontend (aspell)
  1035. # 'english' => 'English',
  1036. # 'german' => 'Deutsch',
  1037. },
  1038. PrefKey => 'UserSpellDict',
  1039. Prio => 5000,
  1040. Active => 1,
  1041. };
  1042. $Self->{PreferencesGroups}->{Comment} = {
  1043. Module => 'Kernel::Output::HTML::PreferencesGeneric',
  1044. Column => 'Other Options',
  1045. Label => 'Comment',
  1046. Desc => 'Comment',
  1047. Block => 'Input',
  1048. Data => '$Env{"UserComment"}',
  1049. PrefKey => 'UserComment',
  1050. Prio => 6000,
  1051. Active => 0,
  1052. };
  1053.  
  1054. $Self->{PreferencesGroups}->{Language} = {
  1055. Module => 'Kernel::Output::HTML::PreferencesLanguage',
  1056. Column => 'Frontend',
  1057. Label => 'Language',
  1058. Desc => 'Select your frontend language.',
  1059. PrefKey => 'UserLanguage',
  1060. Prio => 1000,
  1061. Active => 1,
  1062. };
  1063. $Self->{PreferencesGroups}->{Theme} = {
  1064. Module => 'Kernel::Output::HTML::PreferencesTheme',
  1065. Column => 'Frontend',
  1066. Label => 'Theme',
  1067. Desc => 'Select your frontend Theme.',
  1068. PrefKey => 'UserTheme',
  1069. Prio => 2000,
  1070. Active => 1,
  1071. };
  1072.  
  1073. # --------------------------------------------------- #
  1074. # #
  1075. # Start of config options!!! #
  1076. # Notification stuff #
  1077. # #
  1078. # --------------------------------------------------- #
  1079.  
  1080. # notification sender
  1081. $Self->{NotificationSenderName} = 'OTRS Notification Master';
  1082. $Self->{NotificationSenderEmail} = 'otrs@<OTRS_CONFIG_FQDN>';
  1083.  
  1084. # notification email for new password
  1085. $Self->{NotificationSubjectLostPassword} = 'New OTRS Password!';
  1086. $Self->{NotificationBodyLostPassword} = "
  1087. Hi <OTRS_USERFIRSTNAME>,
  1088.  
  1089. you or someone impersonating you has requested to change your OTRS
  1090. password.
  1091.  
  1092. New Password: <OTRS_NEWPW>
  1093.  
  1094. <OTRS_CONFIG_HttpType>://<OTRS_CONFIG_FQDN>/<OTRS_CONFIG_ScriptAlias>index.pl
  1095.  
  1096. Your OTRS Notification Master
  1097. ";
  1098.  
  1099. # --------------------------------------------------- #
  1100. # #
  1101. # Start of config options!!! #
  1102. # CustomerPanel stuff #
  1103. # #
  1104. # --------------------------------------------------- #
  1105.  
  1106. # SessionName
  1107. # (Name of the session key. E. g. Session, SessionID, OTRS)
  1108. $Self->{CustomerPanelSessionName} = 'CSID';
  1109.  
  1110. # CustomerPanelUserID
  1111. # (The customer panel db-uid.) [default: 1]
  1112. $Self->{CustomerPanelUserID} = 1;
  1113.  
  1114. # CustomerGroupSupport (0 = compat. to OTRS 1.1 or lower)
  1115. # (if this is 1, the you need to set the group <-> customer user
  1116. # relations! http://host/otrs/index.pl?Action=AdminCustomerUserGroup
  1117. # otherway, each user is ro/rw in each group!)
  1118. $Self->{CustomerGroupSupport} = 0;
  1119.  
  1120. # CustomerGroupAlwaysGroups
  1121. # (if CustomerGroupSupport is true and you don't want to manage
  1122. # each customer user for this groups, then put the groups
  1123. # for all customer user in there)
  1124. $Self->{CustomerGroupAlwaysGroups} = [ 'users', 'info' ];
  1125.  
  1126. # show online agents
  1127. # $Self->{'CustomerFrontend::NotifyModule'}->{'1-ShowAgentOnline'} = {
  1128. # Module => 'Kernel::Output::HTML::NotificationAgentOnline',
  1129. # ShowEmail => 1,
  1130. # IdleMinutes => 60,
  1131. # };
  1132.  
  1133. # --------------------------------------------------- #
  1134. # login and logout settings #
  1135. # --------------------------------------------------- #
  1136. # CustomerPanelLoginURL
  1137. # (If this is anything other than '', then it is assumed to be the
  1138. # URL of an alternate login screen which will be used in place of
  1139. # the default one.)
  1140. # $Self->{CustomerPanelLoginURL} = '';
  1141. # $Self->{CustomerPanelLoginURL} = 'http://host.example.com/cgi-bin/login.pl';
  1142.  
  1143. # CustomerPanelLogoutURL
  1144. # (If this is anything other than '', it is assumed to be the URL
  1145. # of an alternate logout page which users will be sent to when they
  1146. # logout.)
  1147. # $Self->{CustomerPanelLogoutURL} = '';
  1148. # $Self->{CustomerPanelLogoutURL} = 'http://host.example.com/cgi-bin/login.pl';
  1149.  
  1150. # CustomerPanelPreApplicationModule
  1151. # (Used for every request, if defined, the PreRun() function of
  1152. # this module will be used. This interface use useful to check
  1153. # some user options or to redirect not accept new application
  1154. # news)
  1155. # $Self->{CustomerPanelPreApplicationModule}->{CustomerAccept} = 'Kernel::Modules::CustomerAccept';
  1156. # Kernel::Modules::CustomerAccept check key, if this user preferences key
  1157. # is true, then the message is already accepted
  1158. # $Self->{'CustomerPanel::InfoKey'} = 'CustomerAccept1';
  1159. # shown InfoFile located under Kernel/Output/HTML/Standard/CustomerAccept.dtl
  1160. # $Self->{'CustomerPanel::InfoFile'} = 'CustomerAccept';
  1161.  
  1162. # CustomerPanelLostPassword
  1163. # (use lost passowrd feature)
  1164. $Self->{CustomerPanelLostPassword} = 1;
  1165.  
  1166. # CustomerPanelCreateAccount
  1167. # (use create cutomer account self feature)
  1168. $Self->{CustomerPanelCreateAccount} = 1;
  1169.  
  1170. # --------------------------------------------------- #
  1171. # notification email about new password #
  1172. # --------------------------------------------------- #
  1173. $Self->{CustomerPanelSubjectLostPassword} = 'New OTRS Password!';
  1174. $Self->{CustomerPanelBodyLostPassword} = "
  1175. Hi <OTRS_USERFIRSTNAME>,
  1176.  
  1177. you or someone impersonating you has requested to change your OTRS
  1178. password.
  1179.  
  1180. New Password: <OTRS_NEWPW>
  1181.  
  1182. <OTRS_CONFIG_HttpType>://<OTRS_CONFIG_FQDN>/<OTRS_CONFIG_ScriptAlias>customer.pl
  1183.  
  1184. Your OTRS Notification Master
  1185. ";
  1186.  
  1187. # --------------------------------------------------- #
  1188. # notification email about new account #
  1189. # --------------------------------------------------- #
  1190. $Self->{CustomerPanelSubjectNewAccount} = 'New OTRS Account!';
  1191. $Self->{CustomerPanelBodyNewAccount} = "
  1192. Hi <OTRS_USERFIRSTNAME>,
  1193.  
  1194. you or someone impersonating you has created a new OTRS account for
  1195. you (<OTRS_USERFIRSTNAME> <OTRS_USERLASTNAME>).
  1196.  
  1197. Login: <OTRS_USERLOGIN>
  1198. Password: <OTRS_USERPASSWORD>
  1199.  
  1200. <OTRS_CONFIG_HttpType>://<OTRS_CONFIG_FQDN>/<OTRS_CONFIG_ScriptAlias>customer.pl
  1201.  
  1202. Your OTRS Notification Master
  1203. ";
  1204.  
  1205. # --------------------------------------------------- #
  1206. # customer authentication settings #
  1207. # (enable what you need, auth against otrs db, #
  1208. # against a LDAP directory, against HTTP basic #
  1209. # authentication and against Radius server) #
  1210. # --------------------------------------------------- #
  1211. # This is the auth. module againt the otrs db
  1212. # $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::DB';
  1213. # $Self->{'Customer::AuthModule::DB::Table'} = 'customer_user';
  1214. # $Self->{'Customer::AuthModule::DB::CustomerKey'} = 'login';
  1215. # $Self->{'Customer::AuthModule::DB::CustomerPassword'} = 'pw';
  1216.  
  1217. # $Self->{'Customer::AuthModule::DB::DSN'} = "DBI:mysql:database=customerdb;host=customerdbhost";
  1218. # $Self->{'Customer::AuthModule::DB::User'} = "some_user";
  1219. # $Self->{'Customer::AuthModule::DB::Password'} = "some_password";
  1220.  
  1221. # if you use odbc or you want to define a database type (without autodetection)
  1222. # $Self->{'Customer::AuthModule::DB::Type'} = 'mysql';
  1223.  
  1224. # password crypt type (md5|crypt|plain)
  1225. # $Self->{'Customer::AuthModule::DB::CryptType'} = 'md5';
  1226.  
  1227. # This is an example configuration for an LDAP auth. backend.
  1228. # (take care that Net::LDAP is installed!)
  1229. $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
  1230. $Self->{'Customer::AuthModule::LDAP::Host'} = 'nameAD';
  1231. $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=moidomen,dc=lcl';
  1232. $Self->{'Customer::AuthModule::LDAP::UID'} = 'otrsadmin';
  1233. $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'CN=otrsadmin,OU=OTRS,dc=moidomen,dc=lcl';
  1234. $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = '12345678';
  1235. # Check if the user is allowed to auth in a posixGroup
  1236. # (e. g. user needs to be in a group xyz to use otrs)
  1237. # $Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'cn=otrsallow,ou=posixGroups,dc=example,dc=com';
  1238. # $Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'memberUid';
  1239. # for ldap posixGroups objectclass (just uid)
  1240. # $Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'UID';
  1241. # for non ldap posixGroups objectclass (full user dn)
  1242. # $Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'DN';
  1243.  
  1244. # The following is valid but would only be necessary if the
  1245. # anonymous user do NOT have permission to read from the LDAP tree
  1246. $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'CN=otrsadmin,OU=OTRS,dc=moidomen,dc=lcl';
  1247. $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = '12345678';
  1248.  
  1249. # in case you want to add always one filter to each ldap query, use
  1250. # this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
  1251. # $Self->{'Customer::AuthModule::LDAP::AlwaysFilter'} = '';
  1252.  
  1253. # in case you want to add a suffix to each customer login name, then
  1254. # you can use this option. e. g. user just want to use user but
  1255. # in your ldap directory exists user@domain.
  1256. # $Self->{'Customer::AuthModule::LDAP::UserSuffix'} = '@domain.com';
  1257.  
  1258. # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
  1259. # $Self->{'Customer::AuthModule::LDAP::Params'} = {
  1260. # port => 389,
  1261. # timeout => 120,
  1262. # async => 0,
  1263. # version => 3,
  1264. # };
  1265.  
  1266. # Die if backend can't work, e. g. can't connect to server.
  1267. # $Self->{'Customer::AuthModule::LDAP::Die'} = 1;
  1268.  
  1269. # This is an example configuration for an apache ($ENV{REMOTE_USER})
  1270. # auth. backend. Use it if you want to have a singe login through
  1271. # apache http-basic-auth
  1272. # $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::HTTPBasicAuth';
  1273.  
  1274. # In case there is a leading domain in the REMOTE_USER, you can
  1275. # replace it by the next config option.
  1276. # $Self->{'Customer::AuthModule::HTTPBasicAuth::Replace'} = 'example_domain\\';
  1277. # Note:
  1278. # In case you need to replace some part of the REMOTE_USER, you can
  1279. # use the following RegExp ($1 will be new login).
  1280. # $Self->{'Customer::AuthModule::HTTPBasicAuth::ReplaceRegExp'} = '^(.+?)@.+?$';
  1281. # If you use this module, you should use as fallback the following
  1282. # config settings if user isn't login through apache ($ENV{REMOTE_USER})
  1283. # $Self->{CustomerPanelLoginURL} = 'http://host.example.com/not-authorised-for-otrs.html';
  1284. # $Self->{CustomerPanelLogoutURL} = 'http://host.example.com/thanks-for-using-otrs.html';
  1285.  
  1286. # This is example configuration to auth. agents against a radius server
  1287. # $Self->{'Customer::AuthModule'} = 'Kernel::System::Auth::Radius';
  1288. # $Self->{'Customer::AuthModule::Radius::Host'} = 'radiushost';
  1289. # $Self->{'Customer::AuthModule::Radius::Password'} = 'radiussecret';
  1290.  
  1291. # --------------------------------------------------- #
  1292. # #
  1293. # Start of config options!!! #
  1294. # CustomerUser stuff #
  1295. # #
  1296. # --------------------------------------------------- #
  1297.  
  1298. # CustomerUser
  1299. # (customer user database backend and settings)
  1300. $Self->{CustomerUser} = {
  1301. Name => 'Database Backend',
  1302. Module => 'Kernel::System::CustomerUser::DB',
  1303. Params => {
  1304. # if you want to use an external database, add the
  1305. # required settings
  1306. # DSN => 'DBI:odbc:yourdsn',
  1307. # Type => 'mssql', # only for ODBC connections
  1308. # DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
  1309. # User => '',
  1310. # Password => '',
  1311. Table => 'customer_user',
  1312. # if your frontend is unicode and the charset of your
  1313. # customer database server is iso-8859-1, use these options.
  1314. # SourceCharset => 'iso-8859-1',
  1315. # DestCharset => 'utf-8',
  1316.  
  1317. # CaseSensitive will control if the SQL statements need LOWER()
  1318. # function calls to work case insensitively. Setting this to
  1319. # 1 will improve performance dramatically on large databases.
  1320. CaseSensitive => 0,
  1321. },
  1322.  
  1323. # customer unique id
  1324. CustomerKey => 'login',
  1325.  
  1326. # customer #
  1327. CustomerID => 'customer_id',
  1328. CustomerValid => 'valid_id',
  1329. CustomerUserListFields => [ 'first_name', 'last_name', 'email' ],
  1330.  
  1331. # CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'],
  1332. CustomerUserSearchFields => [ 'login', 'first_name', 'last_name', 'customer_id' ],
  1333. CustomerUserSearchPrefix => '*',
  1334. CustomerUserSearchSuffix => '*',
  1335. CustomerUserSearchListLimit => 250,
  1336. CustomerUserPostMasterSearchFields => ['email'],
  1337. CustomerUserNameFields => [ 'title', 'first_name', 'last_name' ],
  1338. CustomerUserEmailUniqCheck => 1,
  1339.  
  1340. # # show now own tickets in customer panel, CompanyTickets
  1341. # CustomerUserExcludePrimaryCustomerID => 0,
  1342. # # generate auto logins
  1343. # AutoLoginCreation => 0,
  1344. # # generate auto login prefix
  1345. # AutoLoginCreationPrefix => 'auto',
  1346. # # admin can change customer preferences
  1347. # AdminSetPreferences => 1,
  1348. # # use customer company support (reference to company, See CustomerCompany settings)
  1349. # CustomerCompanySupport => 1,
  1350. # cache time to live in sec. - cache any database queries
  1351. CacheTTL => 60 * 60 * 24,
  1352. # # just a read only source
  1353. # ReadOnly => 1,
  1354. Map => [
  1355.  
  1356. # note: Login, Email and CustomerID needed!
  1357. # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target, link class(es)
  1358. [ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ],
  1359. [ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var', '', 0 ],
  1360. [ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', '', 0 ],
  1361. [ 'UserLogin', 'Username', 'login', 1, 1, 'var', '', 0 ],
  1362. [ 'UserPassword', 'Password', 'pw', 0, 0, 'var', '', 0 ],
  1363. [ 'UserEmail', 'Email', 'email', 1, 1, 'var', '', 0 ],
  1364. # [ 'UserEmail', 'Email', 'email', 1, 1, 'var', '$Env{"CGIHandle"}?Action=AgentTicketCompose;ResponseID=1;TicketID=$Data{"TicketID"};ArticleID=$Data{"ArticleID"}', 0, '', 'AsPopup OTRSPopup_TicketAction' ],
  1365. [ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
  1366. # [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
  1367. [ 'UserPhone', 'Phone', 'phone', 1, 0, 'var', '', 0 ],
  1368. [ 'UserFax', 'Fax', 'fax', 1, 0, 'var', '', 0 ],
  1369. [ 'UserMobile', 'Mobile', 'mobile', 1, 0, 'var', '', 0 ],
  1370. [ 'UserStreet', 'Street', 'street', 1, 0, 'var', '', 0 ],
  1371. [ 'UserZip', 'Zip', 'zip', 1, 0, 'var', '', 0 ],
  1372. [ 'UserCity', 'City', 'city', 1, 0, 'var', '', 0 ],
  1373. [ 'UserCountry', 'Country', 'country', 1, 0, 'var', '', 0 ],
  1374. [ 'UserComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
  1375. [ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ],
  1376. ],
  1377.  
  1378. # default selections
  1379. Selections => {
  1380.  
  1381. # UserTitle => {
  1382. # 'Mr.' => 'Mr.',
  1383. # 'Mrs.' => 'Mrs.',
  1384. # },
  1385. },
  1386. };
  1387.  
  1388. # CustomerUser
  1389. # (customer user ldap backend and settings)
  1390. $Self->{CustomerUser} = {
  1391. Name => 'LDAP Backend',
  1392. Module => 'Kernel::System::CustomerUser::LDAP',
  1393. Params => {
  1394. # # ldap host
  1395. Host => 'nameAD',
  1396. # # ldap base dn
  1397. BaseDN => 'dc=moidomen, dc=lcl',
  1398. # # search scope (one|sub)
  1399. SSCOPE => 'sub',
  1400. # # The following is valid but would only be necessary if the
  1401. # # anonymous user does NOT have permission to read from the LDAP tree
  1402. UserDN => 'CN=otrsadmin,OU=OTRS,dc=moidomen,dc=lcl',
  1403. UserPw => '12345678',
  1404. # # in case you want to add always one filter to each ldap query, use
  1405. # # this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
  1406. AlwaysFilter => '(&(objectcategory=person)(objectclass=user)(mail=*)(!(description=built-In))(!(userAccountControl:1.2.840.113556.1.4.803:=2)))',
  1407. # # if both your frontend and your LDAP are unicode, use this:
  1408. SourceCharset => 'utf-8',
  1409. DestCharset => 'utf-8',
  1410. # # if your frontend is unicode and the charset of your
  1411. # # ldap server is iso-8859-1, use these options.
  1412. # # SourceCharset => 'iso-8859-1',
  1413. # # DestCharset => 'utf-8',
  1414. # # die if backend can't work, e. g. can't connect to server
  1415. # Die => 0,
  1416. # # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
  1417. # Params => {
  1418. # port => 389,
  1419. # timeout => 120,
  1420. # async => 0,
  1421. # version => 3,
  1422. # },
  1423. },
  1424. # # customer unique id
  1425. CustomerKey => 'otrsadmin',
  1426. # # customer #
  1427. CustomerID => 'otrsadmin',
  1428. CustomerUserListFields => ['otrsadmin', 'cn', 'mail'],
  1429. CustomerUserSearchFields => ['otrsadmin', 'cn', 'mail'],
  1430. CustomerUserPostMasterSearchFields => ['mail'],
  1431. CustomerUserNameFields => ['givenname', 'sn'],
  1432. Map => [
  1433. [ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
  1434. [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
  1435. [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
  1436. [ 'UserLogin', 'Login', 'otrsadmin', 1, 1, 'var' ],
  1437. [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
  1438. [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
  1439. [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
  1440. [ 'UserAddress', 'Address', 'physicalDeliveryOfficeName', 1, 0, 'var' ],
  1441. [ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
  1442. ],
  1443. };
  1444. # CustomerUserSearchPrefix => '',
  1445. # CustomerUserSearchSuffix => '*',
  1446. # CustomerUserSearchListLimit => 250,
  1447. # CustomerUserPostMasterSearchFields => ['mail'],
  1448. # CustomerUserNameFields => ['givenname', 'sn'],
  1449. # # show now own tickets in customer panel, CompanyTickets
  1450. # CustomerUserExcludePrimaryCustomerID => 0,
  1451. # # add a ldap filter for valid users (expert setting)
  1452. # # CustomerUserValidFilter => '(!(description=gesperrt))',
  1453. # # admin can't change customer preferences
  1454. # AdminSetPreferences => 0,
  1455. # # cache time to live in sec. - cache any ldap queries
  1456. # CacheTTL => 0,
  1457. # Map => [
  1458. # # note: Login, Email and CustomerID needed!
  1459. # # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
  1460. # [ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ],
  1461. # [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var', '', 0 ],
  1462. # [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var', '', 0 ],
  1463. # [ 'UserLogin', 'Username', 'uid', 1, 1, 'var', '', 0 ],
  1464. # [ 'UserEmail', 'Email', 'mail', 1, 1, 'var', '', 0 ],
  1465. # [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var', '', 0 ],
  1466. # # [ 'UserCustomerIDs', 'CustomerIDs', 'second_customer_ids', 1, 0, 'var', '', 0 ],
  1467. # [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var', '', 0 ],
  1468. # [ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var', '', 0 ],
  1469. # [ 'UserComment', 'Comment', 'description', 1, 0, 'var', '', 0 ],
  1470. # ],
  1471. # };
  1472.  
  1473. $Self->{CustomerCompany} = {
  1474. Params => {
  1475. # if you want to use an external database, add the
  1476. # required settings
  1477. # DSN => 'DBI:odbc:yourdsn',
  1478. # Type => 'mssql', # only for ODBC connections
  1479. # DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
  1480. # User => '',
  1481. # Password => '',
  1482. Table => 'customer_company',
  1483. # ForeignDB => 0, # set this to 1 if your table does not have create_time, create_by, change_time and change_by fields
  1484.  
  1485. # CaseSensitive will control if the SQL statements need LOWER()
  1486. # function calls to work case insensitively. Setting this to
  1487. # 1 will improve performance dramatically on large databases.
  1488. CaseSensitive => 0,
  1489. },
  1490.  
  1491. # company unique id
  1492. CustomerCompanyKey => 'customer_id',
  1493. CustomerCompanyValid => 'valid_id',
  1494. CustomerCompanyListFields => [ 'customer_id', 'name' ],
  1495. CustomerCompanySearchFields => ['customer_id', 'name'],
  1496. CustomerCompanySearchPrefix => '',
  1497. CustomerCompanySearchSuffix => '*',
  1498. CustomerCompanySearchListLimit => 250,
  1499. CacheTTL => 60 * 60 * 24, # use 0 to turn off cache
  1500.  
  1501. Map => [
  1502. # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
  1503. [ 'CustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
  1504. [ 'CustomerCompanyName', 'Company', 'name', 1, 1, 'var', '', 0 ],
  1505. [ 'CustomerCompanyStreet', 'Street', 'street', 1, 0, 'var', '', 0 ],
  1506. [ 'CustomerCompanyZIP', 'Zip', 'zip', 1, 0, 'var', '', 0 ],
  1507. [ 'CustomerCompanyCity', 'City', 'city', 1, 0, 'var', '', 0 ],
  1508. [ 'CustomerCompanyCountry', 'Country', 'country', 1, 0, 'var', '', 0 ],
  1509. [ 'CustomerCompanyURL', 'URL', 'url', 1, 0, 'var', '$Data{"CustomerCompanyURL"}', 0 ],
  1510. [ 'CustomerCompanyComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
  1511. [ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ],
  1512. ],
  1513. };
  1514.  
  1515. # --------------------------------------------------- #
  1516. # misc
  1517. # --------------------------------------------------- #
  1518. # yes / no options
  1519. $Self->{YesNoOptions} = {
  1520. 1 => 'Yes',
  1521. 0 => 'No',
  1522. };
  1523.  
  1524. # --------------------------------------------------- #
  1525. # default core objects and params in frontend
  1526. # --------------------------------------------------- #
  1527. $Self->{'Frontend::CommonObject'} = {
  1528.  
  1529. # key => module
  1530. # SomeObject => 'Kernel::System::Some',
  1531. };
  1532. $Self->{'Frontend::CommonParam'} = {
  1533.  
  1534. # param => default value
  1535. # SomeParam => 'DefaultValue',
  1536. Action => 'AdminInit',
  1537. };
  1538.  
  1539. # --------------------------------------------------- #
  1540. # default core objects and params in customer frontend
  1541. # --------------------------------------------------- #
  1542. $Self->{'CustomerFrontend::CommonObject'} = {
  1543.  
  1544. # key => module
  1545. # SomeObject => 'Kernel::System::Some',
  1546. };
  1547. $Self->{'CustomerFrontend::CommonParam'} = {
  1548.  
  1549. # param => default value
  1550. # SomeParam => 'DefaultValue',
  1551. };
  1552.  
  1553. # --------------------------------------------------- #
  1554. # default core objects and params in public frontend
  1555. # --------------------------------------------------- #
  1556. $Self->{'PublicFrontend::CommonObject'} = {
  1557.  
  1558. # key => module
  1559. # SomeObject => 'Kernel::System::Some',
  1560. };
  1561. $Self->{'PublicFrontend::CommonParam'} = {
  1562.  
  1563. # param => default value
  1564. # SomeParam => 'DefaultValue',
  1565. };
  1566.  
  1567. # --------------------------------------------------- #
  1568. # Frontend Module Registry (Agent)
  1569. # --------------------------------------------------- #
  1570. # Module (from Kernel/Modules/*.pm) => Group
  1571.  
  1572. # admin interface
  1573. $Self->{'Frontend::Module'}->{Admin} = {
  1574. Group => ['admin'],
  1575. Description => 'Admin-Area',
  1576. Title => '',
  1577. NavBarName => 'Admin',
  1578. NavBar => [
  1579. { Description => 'Admin-Area',
  1580. Type => 'Menu',
  1581. Block => 'ItemArea',
  1582. Name => 'Admin',
  1583. Image => 'admin.png',
  1584. Link => 'Action=Admin',
  1585. NavBar => 'Admin',
  1586. Prio => 10000,
  1587. AccessKey => 'a',
  1588. },
  1589. ],
  1590. NavBarModule => { Module => 'Kernel::Output::HTML::NavBarModuleAdmin', },
  1591. };
  1592. $Self->{'Frontend::Module'}->{AdminInit} = {
  1593. Group => ['admin'],
  1594. Description => 'Admin',
  1595. Title => 'Init',
  1596. };
  1597. $Self->{'Frontend::Module'}->{AdminLog} = {
  1598. Group => ['admin'],
  1599. Description => 'Admin',
  1600. Title => 'System Log',
  1601. NavBarName => 'Admin',
  1602. NavBarModule => {
  1603. Module => 'Kernel::Output::HTML::NavBarModuleAdmin',
  1604. Name => 'System Log',
  1605. Block => 'Block4',
  1606. Prio => 600,
  1607. },
  1608. };
  1609. $Self->{'Frontend::Module'}->{AdminSysConfig} = {
  1610. Group => ['admin'],
  1611. Description => 'Admin',
  1612. Title => 'SysConfig',
  1613. NavBarName => 'Admin',
  1614. NavBarModule => {
  1615. Module => 'Kernel::Output::HTML::NavBarModuleAdmin',
  1616. Name => 'SysConfig',
  1617. Description => 'Edit the system configuration settings.',
  1618. Block => 'System',
  1619. Prio => 800,
  1620. },
  1621. Loader => {
  1622. CSS => [
  1623. 'Core.Agent.Admin.SysConfig.css',
  1624. ],
  1625. JavaScript => [
  1626. 'Core.Agent.Admin.SysConfig.js',
  1627. ],
  1628. },
  1629. };
  1630. $Self->{'Frontend::Module'}->{AdminPackageManager} = {
  1631. Group => ['admin'],
  1632. Description => 'Software Package Manager',
  1633. Title => 'Package Manager',
  1634. NavBarName => 'Admin',
  1635. NavBarModule => {
  1636. Module => 'Kernel::Output::HTML::NavBarModuleAdmin',
  1637. Name => 'Package Manager',
  1638. Block => 'Block4',
  1639. Prio => 1000,
  1640. },
  1641. };
  1642. # specify Loader settings for Login screens
  1643. $Self->{'Frontend::Module'}->{Login} = {
  1644. Loader => {
  1645. JavaScript => [
  1646. 'Core.Agent.Login.js',
  1647. ],
  1648. },
  1649. };
  1650. $Self->{'CustomerFrontend::Module'}->{CustomerLogin} = {
  1651. Loader => {
  1652. JavaScript => [
  1653. 'Core.Customer.Login.js',
  1654. ],
  1655. },
  1656. };
  1657.  
  1658. # specify Loader settings for the installer
  1659. $Self->{'Frontend::Module'}->{Installer} = {
  1660. Loader => {
  1661. JavaScript => [
  1662. 'Core.Installer.js',
  1663. ],
  1664. CSS => [
  1665. 'Core.Installer.css'
  1666. ],
  1667. },
  1668. };
  1669. # --------------------------------------------------- #
  1670. return;
  1671. }
  1672.  
  1673. sub Get {
  1674. my ( $Self, $What ) = @_;
  1675.  
  1676. # debug
  1677. if ( $Self->{Debug} > 1 ) {
  1678. my $Value = defined $Self->{$What} ? $Self->{$What} : '<undef>';
  1679. print STDERR "Debug: Config.pm ->Get('$What') --> $Value\n";
  1680. }
  1681.  
  1682. return $Self->{$What};
  1683. }
  1684.  
  1685. sub Set {
  1686. my ( $Self, %Param ) = @_;
  1687.  
  1688. for (qw(Key)) {
  1689. if ( !defined $Param{$_} ) {
  1690. $Param{$_} = '';
  1691. }
  1692. }
  1693.  
  1694. # debug
  1695. if ( $Self->{Debug} > 1 ) {
  1696. my $Value = defined $Param{Value} ? $Param{Value} : '<undef>';
  1697. print STDERR "Debug: Config.pm ->Set(Key => $Param{Key}, Value => $Value)\n";
  1698. }
  1699.  
  1700. # set runtime config option
  1701. if ( $Param{Key} =~ /^(.+?)###(.+?)$/ ) {
  1702. if ( !defined $Param{Value} ) {
  1703. delete $Self->{$1}->{$2};
  1704. }
  1705. else {
  1706. $Self->{$1}->{$2} = $Param{Value};
  1707. }
  1708. }
  1709. else {
  1710. if ( !defined $Param{Value} ) {
  1711. delete $Self->{ $Param{Key} };
  1712. }
  1713. else {
  1714. $Self->{ $Param{Key} } = $Param{Value};
  1715. }
  1716. }
  1717. return 1;
  1718. }
  1719.  
  1720. #
  1721. # ConfigChecksum
  1722. #
  1723. # This function returns an MD5 sum that is generated from all available
  1724. # config files (Kernel/Config.pm, Kernel/Config/Defaults.pm, Kernel/Config/Files/*.(pm|xml) except ZZZAAuto.pm) and their
  1725. # modification timestamps. Whenever a file is changed, added or removed,
  1726. # this checksum will change.
  1727. #
  1728. sub ConfigChecksum {
  1729. my $Self = shift;
  1730.  
  1731. my @Files = glob( $Self->{Home} . "/Kernel/Config/Files/*.pm");
  1732.  
  1733. # Ignore ZZZAAuto.pm, because this is only a cached version of the XML files which
  1734. # will be in the checksum. Otherwise the SysConfig cannot use its cache files.
  1735. @Files = grep { $_!~ m/ZZZAAuto\.pm$/smx } @Files;
  1736.  
  1737. push @Files, glob( $Self->{Home} . "/Kernel/Config/Files/*.xml");
  1738. push @Files, $Self->{Home} . "/Kernel/Config/Defaults.pm" ;
  1739. push @Files, $Self->{Home} . "/Kernel/Config.pm";
  1740.  
  1741. # Create a string with filenames and file mtimes of the config files
  1742. my $ConfigString;
  1743. for my $File (@Files) {
  1744.  
  1745. # get file metadata
  1746. my $Stat = stat( $File );
  1747.  
  1748. if ( !$Stat ) {
  1749. print STDERR "Error: cannot stat file '$File': $!";
  1750. return;
  1751. }
  1752.  
  1753. $ConfigString .= $File . $Stat->mtime();
  1754. }
  1755.  
  1756. return Digest::MD5::md5_hex( $ConfigString );
  1757. }
  1758.  
  1759. sub new {
  1760. my ( $Type, %Param ) = @_;
  1761.  
  1762. # allocate new hash for object
  1763. my $Self = {};
  1764. bless( $Self, $Type );
  1765.  
  1766. # 0=off; 1=log if there exists no entry; 2=log all;
  1767. $Self->{Debug} = 0;
  1768.  
  1769. # return on clear level
  1770. if ( $Param{Level} && $Param{Level} eq 'Clear' ) {
  1771.  
  1772. # load config
  1773. $Self->Load();
  1774. return $Self;
  1775. }
  1776.  
  1777. # load defaults
  1778. $Self->LoadDefaults();
  1779.  
  1780. # load config
  1781. $Self->Load();
  1782.  
  1783. # load extra config files
  1784. if ( -e "$Self->{Home}/Kernel/Config/Files/" ) {
  1785. my @Files = glob("$Self->{Home}/Kernel/Config/Files/*.pm");
  1786.  
  1787. # sort
  1788. my @NewFileOrderPre = ();
  1789. my @NewFileOrderPost = ();
  1790. for my $File (@Files) {
  1791. if ( $File =~ /Ticket/ ) {
  1792. push @NewFileOrderPre, $File;
  1793. }
  1794. else {
  1795. push @NewFileOrderPost, $File;
  1796. }
  1797. }
  1798. @Files = ( @NewFileOrderPre, @NewFileOrderPost );
  1799. for my $File (@Files) {
  1800.  
  1801. # do not use ZZZ files
  1802. if ( $Param{Level} && $Param{Level} eq 'Default' && $File =~ /ZZZ/ ) {
  1803. next;
  1804. }
  1805.  
  1806. # check config file format - use 1.0 as eval string, 1.1 as require or do
  1807. my $FileFormat = 1;
  1808. my $ConfigFile = '';
  1809. ## no critic
  1810. if ( open( my $In, '<', $File ) ) {
  1811. ## use critic
  1812.  
  1813. # only try to find # VERSION:1.1 in the first 8 lines
  1814. my $TryCount = 0;
  1815. while ( my $Line = <$In> ) {
  1816. if ($Line =~ /^\Q# VERSION:1.1\E/) {
  1817. $FileFormat = 1.1;
  1818. last;
  1819. }
  1820.  
  1821. $TryCount++;
  1822. if ( $TryCount >= 8 ) {
  1823. last;
  1824. }
  1825. }
  1826. close($In);
  1827.  
  1828. # read file format 1.0 - file as string
  1829. if ( $FileFormat == 1 ) {
  1830. open( my $In, '<', $File );
  1831. $ConfigFile = do {local $/; <$In>};
  1832. close $In;
  1833. }
  1834. }
  1835. else {
  1836. print STDERR "ERROR: $!: $File\n";
  1837. }
  1838.  
  1839. # use file format of config file
  1840. if ( $FileFormat == 1.1 ) {
  1841.  
  1842. # check if mod_perl is used
  1843. my $Require = 1;
  1844. if ( exists $ENV{MOD_PERL} ) {
  1845.  
  1846. # if mod_perl 2.x is used, check if Apache::Reload is use
  1847. # on win32 Apache::Reload is not working correctly, so do also use "do"
  1848. my $OS = $^O;
  1849. ## no critic
  1850. if ( $mod_perl::VERSION >= 1.99 && $OS ne 'MSWin32') {
  1851. ## use critic
  1852. my $ApacheReload = 0;
  1853. for my $Module ( sort keys %INC ) {
  1854. $Module =~ s/\//::/g;
  1855. $Module =~ s/\.pm$//g;
  1856. if ( $Module eq 'Apache::Reload' || $Module eq 'Apache2::Reload' ) {
  1857. $ApacheReload = 1;
  1858. last;
  1859. }
  1860. }
  1861. if ( !$ApacheReload ) {
  1862. $Require = 0;
  1863. }
  1864. }
  1865.  
  1866. # if mod_perl 1.x is used, do not use require
  1867. else {
  1868. $Require = 0;
  1869. }
  1870. }
  1871.  
  1872. # if require is usable, use it (because of better performance,
  1873. # if not, use do to do it on runtime)
  1874. ## no critic
  1875. if ( $Require ) {
  1876. if (! require $File ) {
  1877. die "ERROR: $!\n";
  1878. }
  1879. }
  1880. else {
  1881. if (! do $File ) {
  1882. die "ERROR: $!\n";
  1883. }
  1884. }
  1885. ## use critic
  1886.  
  1887. # prepare file
  1888. $File =~ s/\Q$Self->{Home}\E//g;
  1889. $File =~ s/^\///g;
  1890. $File =~ s/\/\//\//g;
  1891. $File =~ s/\//::/g;
  1892. $File =~ s/.pm//g;
  1893. $File->Load($Self);
  1894. }
  1895. else {
  1896.  
  1897. # use eval for old file format
  1898. if ($ConfigFile) {
  1899. if ( !eval $ConfigFile ) { ## no critic
  1900. print STDERR "ERROR: Syntax error in $File: $@\n";
  1901. }
  1902.  
  1903. # print STDERR "Notice: Loaded: $File\n";
  1904. }
  1905. }
  1906. }
  1907. }
  1908.  
  1909. # load RELEASE file
  1910. if ( -e ! "$Self->{Home}/RELEASE" ) {
  1911. print STDERR "ERROR: $Self->{Home}/RELEASE does not exist! This file is needed by central system parts of OTRS, the system will not work without this file.\n";
  1912. die;
  1913. }
  1914. if ( open( my $Product, '<', "$Self->{Home}/RELEASE" ) ) { ## no critic
  1915. while (<$Product>) {
  1916.  
  1917. # filtering of comment lines
  1918. if ( $_ !~ /^#/ ) {
  1919. if ( $_ =~ /^PRODUCT\s{0,2}=\s{0,2}(.*)\s{0,2}$/i ) {
  1920. $Self->{Product} = $1;
  1921. }
  1922. elsif ( $_ =~ /^VERSION\s{0,2}=\s{0,2}(.*)\s{0,2}$/i ) {
  1923. $Self->{Version} = $1;
  1924. }
  1925. }
  1926. }
  1927. close($Product);
  1928. }
  1929. else {
  1930. print STDERR "ERROR: Can't read $Self->{Home}/RELEASE: $! This file is needed by central system parts of OTRS, the system will not work without this file.\n";
  1931. die;
  1932. }
  1933.  
  1934. # load config (again)
  1935. $Self->Load();
  1936.  
  1937. # do not use ZZZ files
  1938. if ( !$Param{Level} ) {
  1939.  
  1940. # replace config variables in config variables
  1941. for my $Key ( sort keys %{$Self} ) {
  1942. next if !defined $Key;
  1943. if ( defined $Self->{$Key} ) {
  1944. $Self->{$Key} =~ s/\<OTRS_CONFIG_(.+?)\>/$Self->{$1}/g;
  1945. }
  1946. else {
  1947. print STDERR "ERROR: $Key not defined!\n";
  1948. }
  1949. }
  1950. }
  1951.  
  1952. return $Self;
  1953. }
  1954.  
  1955. 1;
  1956.  
  1957. =head1 TERMS AND CONDITIONS
  1958.  
  1959. This software is part of the OTRS project (L<http://otrs.org/>).
  1960.  
  1961. This software comes with ABSOLUTELY NO WARRANTY. For details, see
  1962. the enclosed file COPYING for license information (AGPL). If you
  1963. did not receive this file, see L<http://www.gnu.org/licenses/agpl.txt>.
  1964.  
  1965. =cut
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement