# --
# Kernel/Config.pm - Config file for OTRS kernel
# Copyright (C) 2001-2004 Martin Edenhofer <martin+code@otrs.org>
# --
# $Id: Config.pm.dist,v 1.13 2004/08/10 06:56:39 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --
#  Note:
#
#  -->> OTRS does have a lot of config settings. For more settings
#       (Notifications, TicketViewAccelerator, TicketNumberGenerator,
#       LDAP, PostMaster, Session, Preferences, ...) see
#       Kernel/Config/Defaults.pm and copy your wanted lines into "this"
#       config file. This file will not be changed on update!
#
# --
package Kernel::Config;
# --
sub Load {
    my $Self = shift;
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #         Start of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #

    # ---------------------------------------------------- #
    # system data                                          #
    # ---------------------------------------------------- #
    # SecureMode
    # (Enable this so you can't use the installer.pl)
    $Self->{SecureMode} = 1;
    # SystemID
    # (The identify of the system. Each ticket number and
    # each http session id starts with this number)
    $Self->{SystemID} = 10;
    # TicketHook
    # (To set the Ticket identifier. Some people want to
    # set this to e. g. 'Call#', 'MyTicket#' or 'TN'.)
    $Self->{TicketHook} = 'Call#';
    # FQDN
    # (Full qualified domain name of your system.)
    $Self->{FQDN} = 'inli044.ing.temic.de';
    # AdminEmail
    # (Email of the system admin.)
    $Self->{AdminEmail} = 'florian.ottillinger@temic.com';
    # Organization
    # (If this is anything other than '', then the email will have an
    # Organization X-Header)
    $Self->{Organization} = 'Temic';

    # ---------------------------------------------------- #
    # database settings                                    #
    # ---------------------------------------------------- #
    # DatabaseHost
    # (The database host.)
    $Self->{DatabaseHost} = 'localhost';
    # Database
    # (The database name.)
    $Self->{Database} = 'otrs';
    # DatabaseUser
    # (The database user.)
    $Self->{DatabaseUser} = 'otrs';
    # DatabasePw
    # (The password of database user. You also can use bin/CryptPassword.pl
    # for crypted passwords.)
    $Self->{DatabasePw} = 'XXX';
    # DatabaseDSN
    # (The database DSN for MySQL ==> more: "man DBD::mysql")
    $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";

    # (The database DSN for PostgrSQL ==> more: "man DBD::Pg")
#    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";

    # ---------------------------------------------------- #
    # fs root directory
    # ---------------------------------------------------- #
    $Self->{Home} = '/opt/otrs';

    # **************************************************** #
    # insert your own config settings "here"               #
    # config settings taken from Kernel/Config/Defaults.pm #
    # **************************************************** #
    # $Self->{SessionUseCookie} = 0;
    # $Self->{CheckMXRecord} = 1;

    # **************************************************** #

    # ---------------------------------------------------- #
    # data inserted by installer                           #
    # ---------------------------------------------------- #
    # $DIBI$
    $Self->{TicketNumberGenerator} = 'Kernel::System::Ticket::Number::DateChecksum';
    $Self->{LogModule::LogFile} = '/var/log/otrs';
    $Self->{LogModule} = 'Kernel::System::Log::SysLog';
    $Self->{DefaultLanguage} = 'de';
    $Self->{DefaultCharset} = 'iso-8859-1';

    ######################
    # Start of My Config #
    ######################
    $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
    $Self->{'AuthModule::LDAP::Host'} = '172.24.16.27';
    $Self->{'AuthModule::LDAP::BaseDN'} = 'ou=in,ou=eu,ou=au,o=cag';
    $Self->{'AuthModule::LDAP::UID'} = 'uid';
    $Self->{'AuthModule::LDAP::SearchUserDN'} = 'cn=Florian Ottillinger,ou=in,ou=eu,ou=au,o=cag';
    $Self->{'AuthModule::LDAP::SearchUserPw'} = 'XXX';

    # This is an example configuration for an LDAP auth. backend.
    # (take care that Net::LDAP is installed!)

    $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
    $Self->{'Customer::AuthModule::LDAP::Host'} = '172.24.16.27';
    $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'ou=in,ou=eu,ou=au,o=cag';
    $Self->{'Customer::AuthModule::LDAP::UID'} = 'uid';

    # The following is valid but would only be necessary if the
    # anonymous user do NOT have permission to read from the LDAP tree

    $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'cn=Florian Ottillinger,ou=in,ou=eu,ou=au,o=cag';
    $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'XXX';

    # CustomerUser
    # (customer user database backend and settings)

    $Self->{CustomerUser} = {
    Name => 'Datenbank',
    Module => 'Kernel::System::CustomerUser::DB',
    Params => { Table => 'customer_user',
    # to use an external database
    # DSN => 'DBI:odbc:yourdsn',
    # DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
    # User => '', Password => '',
    },
    # customer uniq id
    CustomerKey => 'login',
    CustomerID => 'customer_id',
    CustomerValid => 'valid_id',
    CustomerUserListFields => ['first_name', 'last_name', 'email'],
    # CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'],
    CustomerUserSearchFields => ['login', 'last_name', 'customer_id'],
    CustomerUserSearchPrefix => '',
    CustomerUserSearchSuffix => '*',
    CustomerUserSearchListLimit => 250,
    CustomerUserPostMasterSearchFields => ['email'],
    CustomerUserNameFields => ['salutation', 'first_name', 'last_name'],
    # ReadOnly => 1,
    Map => [
    ## note: Login, Email and CustomerID needed!
    # var, frontend, storage, shown, required, storage-type, http-link
    [ 'UserSalutation', 'Salutation', 'salutation', 1, 0, 'var' ],
    [ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var' ],
    [ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var' ],
    [ 'UserLogin', 'Login', 'login', 1, 1, 'var' ],
    [ 'UserPassword', 'Password', 'pw', 0, 1, 'var' ],
    [ 'UserEmail', 'Email', 'email', 0, 1, 'var' ],
    [ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var' ],
    [ 'UserComment', 'Comment', 'comments', 1, 0, 'var' ],
    [ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int' ],
    ],
    };
    # CustomerUser1
    # (customer user ldap backend and settings)
    $Self->{CustomerUser1} = {
    Module => 'Kernel::System::CustomerUser::LDAP',
    Params => {
    # ldap host
    Host => '172.24.16.27',
    # ldap base dn
    BaseDN => 'ou=in,ou=eu,ou=au,o=cag',
    # search scope (one|sub)
    SSCOPE => 'sub',
    # The following is valid but would only be necessary if the
    # anonymous user does NOT have permission to read from the LDAP tree
    UserDN => 'cn=Florian Ottillinger,ou=in,ou=eu,ou=au,o=cag',
    UserPw => 'XXX',
    AlwaysFilter => '',
    SourceCharset => 'utf-8',
    DestCharset => 'iso-8859-1',
    },
    # customer uniq id
    CustomerKey => 'uid',
    # customer #
    CustomerID => 'mail',
    CustomerUserListFields => ['uid', 'cn', 'mail'],
    CustomerUserSearchFields => ['uid', 'cn', 'mail'],
    CustomerUserSearchPrefix => '',
    CustomerUserSearchSuffix => '*',
    CustomerUserSearchListLimit => 250,
    CustomerUserPostMasterSearchFields => ['mail'],
    CustomerUserNameFields => ['givenname', 'sn'],
    Map => [
    # note: Login, Email and CustomerID needed!
    # var, frontend, storage, shown, required, storage-type
    #[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
    [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
    [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
    [ 'UserLogin', 'Login', 'uid', 1, 1, 'var' ],
    [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
    [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
    [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
    #[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
    #[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
    ],
};
# End example config
#------------------------------------------------------------------------
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #           End of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
}

# ---------------------------------------------------- #
# needed system stuff (don't edit this)                #
# ---------------------------------------------------- #
use strict;
use vars qw(@ISA $VERSION);
use Kernel::Config::Defaults;
push (@ISA, 'Kernel::Config::Defaults');
$VERSION = '$Revision: 1.13 $';
$VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/;
# -----------------------------------------------------#

1;
