Файл Config.pm
Код: Выделить всё
package Kernel::Config;
use utf8;
use Encode;
sub Load {
my $Self = shift;
$Self->{'DefaultCharset'} = 'utf-8';
$Self->{'DatabaseHost'} = 'localhost';
$Self->{'Database'} = 'otrs';
$Self->{'DatabaseUser'} = 'root';
$Self->{'DatabasePw'} = 'otrs';
$Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";
$Self->{SecureMode} = '0';
$Self->{Home} = '/opt/otrs';
$Self->{Debug} = 1;
$Self->{SecureMode} = 1;
#Auth agents in DB
$Self->{AuthModule} = 'Kernel::System::Auth::DB';
#Auth agents in NWTH
$Self->{'AuthModule2'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host2'} = 'office.nwth.com';
$Self->{'AuthModule::LDAP::BaseDN2'} = 'dc=nwth,dc=com';
$Self->{'AuthModule::LDAP::UID2'} = 'sAMAccountName';
$Self->{'AuthModule::LDAP::SearchUserDN2'} = 'NWTH\ldaprequest';
$Self->{'AuthModule::LDAP::SearchUserPw2'} = 'password';
#Auth Customers in NWTH
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} ='office.nwth.com';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=nwth,dc=com';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'NWTH\ldaprequest';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'password';
$Self->{'Customer::AuthModule::LDAP::SourceCharset'} = 'utf-8';
$Self->{'Customer::AuthModule::LDAP::DestCharset'} = 'utf-8';
#Auth Customers in U220
$Self->{'Customer::AuthModule2'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host2'} ='vdc01.shop.com';
$Self->{'Customer::AuthModule::LDAP::BaseDN2'} = 'dc=shop,dc=com';
$Self->{'Customer::AuthModule::LDAP::UID2'} = 'sAMAccountName';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN2'} = 'U220\ldaprequest';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw2'} = 'password';
$Self->{'Customer::AuthModule::LDAP::SourceCharset'} = 'utf-8';
$Self->{'Customer::AuthModule::LDAP::DestCharset'} = 'utf-8';
$Self->{CustomerUser1} = {
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => 'office.nwth.com',
BaseDN => 'dc=nwth,dc=com',
SSCOPE => 'sub',
UserDN => 'NWTH\ldaprequest',
UserPw => 'password',
},
CustomerKey => 'sAMAccountName',
CustomerID => 'mail',
CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
#SourceCharset => 'utf-8', #was cp1251
SourceCharset => 'utf-8',
DestCharset => 'utf-8',
CustomerUserSearchListLimit => 2,
Map => [
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
[ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
]
};