ich habe folgendes Problem:
Wir haben einen LDAP Server und ein ActiveDirectory. OTRS soll nun aus dem LDAP und aus dem AD die Kundendaten (keine Authentifizierung) beziehen. Eigentlich funktioniert das ganze auch ganz gut, nur leider gibt es ein kleines Problem. Wird bei der Ticketerstellung ein Kundenname in das "Von:" Feld eingetragen wird erst das erste Backend durchsucht und danach das zweite Backend. Leider habe ich den Verdacht das sobald eine Mail-Adresse im ersten Backend gefunden wird, das zweite Backend war immer noch durchsucht wird aber eine ebenfalls gefundene Mail-Adresse zur gleichen Kennung (im LDAP: uid - im AD:sAMAccountName) nicht angezeigt wird.
Beispiel:
Eingabe im "Von:" Feld: johndoe
Datensatz (mail) im LDAP: johndoe@firma1.com
Datensatz (mail) im AD: johndoe@firma2.com
Als Ausgabe wird nur die Mailadresse angezeigt welche in dem ersten Backend in der Konfiguration gespeichert ist. Ändere ich die Reihenfolge ist das Verhalten genau umgekehrt.
Nun meine Frage: Gibt es eine Möglichkeit beide Mailadresse zu einer Benutzerkennung, egal ob LDAP (uid) oder AD(sAMAccountName) anzuzeigen.
Beispiel:
Eingabe: "John Doe"
Ausgabe:
<<Name>> | <<mail Feld>> | <<uid oder sAMAccountName >>
"John Doe" "johndoe@firma1.com" (johndoe)
"John Doe" "johndoe@firma2.com" (johndoe)
Danke für eure Hilfe
Code: Select all
###########################################################
###########################################################
######### Kundendaten aus LDAP -- Start -- ############
###########################################################
###########################################################
# CustomerUser
# (customer user ldap backend and settings)
$Self->{CustomerUser1} = {
Name => 'LDAP Datenquelle',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
# ldap host
Host => 'ldaps://meinedomain.de',
# ldap base dn
BaseDN => 'dc=meinedomain,dc=de',
# 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 => 'uid=user,ou=users,dc=meinedomain,dc=de',
UserPw => 'password',
# in case you want to add always one filter to each ldap query, use
# this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
AlwaysFilter => '',
# if your frontend is e. g. iso-8859-1 and the charset of your
# ldap server is utf-8, use this options (if not, ignore it)
# SourceCharset => 'utf-8',
# DestCharset => 'iso-8859-1',
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
# Params => {
# port => 389,
# timeout => 120,
# async => 0,
# version => 3,
# },
},
# customer uniq id
CustomerKey => 'uid',
# customer #
CustomerID => 'mail',
CustomerUserListFields => ['givenname','sn','mail'],
CustomerUserSearchFields => ['givenname','sn','cn','mail','uid','mailLocalAddress','mailRoutingAddress'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '',
CustomerUserSearchListLimit => 2000,
CustomerUserPostMasterSearchFields => ['mail','mailLocalAddress','mailRoutingAddress','givenname','sn','cn'],
CustomerUserNameFields => ['givenname', 'sn','cn','mail'],
# show now own tickets in customer panel, CompanyTickets
CustomerUserExcludePrimaryCustomerID => 0,
# add a ldap filter for valid users (expert setting)
# CustomerUserValidFilter => '(!(description=gesperrt))',
# admin can't change customer preferences
AdminSetPreferences => 0,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
# [ 'UserSalutation', 'Title', 'title', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var', '', 0 ],
[ 'UserType', 'Status', 'UserType', 1, 0, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'uid', 1, 1, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var', '', 0 ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var', '', 0 ],
# [ 'UserCustomerIDs', 'CustomerIDs', 'second_customer_ids', 1, 0, 'var', '', 0 ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var', '', 0 ],
[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var', '', 0 ],
[ 'HomeDirectory', 'Home-Verz.', 'homeDirectory', 1, 0, 'var', '', 0 ],
[ 'UserStatus', 'Aktivitaet', 'accountStatus', 1, 0, 'var', '', 0 ],
# [ 'UserComment', 'Comment', 'description', 1, 0, 'var', '', 0 ],
],
};
###########################################################
###########################################################
######### Kundendaten aus LDAP -- Ende -- #############
###########################################################
###########################################################
Code: Select all
###########################################################
###########################################################
##### Kundendaten aus AD -- Start -- #########################
###########################################################
###########################################################
# 2. Customer user backend: LDAP
# (customer user ldap backend and settings)
$Self->{CustomerUser2} = {
Name => 'AD Datenquelle',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
# ldap host
Host => 'meinedomain.de',
# ldap base dn
BaseDN => 'ou=xxx,dc=xxx,dc=xxx,dc=de',
# 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=otrs,cn=xxx,dc=xxx,dc=xxx,dc=de',
UserPw => 'password',
# in case you want to add always one filter to each ldap query, use
# this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
AlwaysFilter => '',
# if your frontend is e. g. iso-8859-1 and the charset of your
# ldap server is utf-8, use this options (if not, ignore it)
# SourceCharset => 'utf-8',
# DestCharset => 'iso-8859-1',
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
# Params => {
# port => 389,
# timeout => 120,
# async => 0,
# version => 3,
# },
},
# customer uniq id
CustomerKey => 'sAMAccountName',
# customer #
CustomerID => 'mail',
CustomerUserListFields => ['givenname','sn','mail'],
CustomerUserSearchFields => ['sn','cn','givenname','mail','sAMAccountName'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '',
CustomerUserSearchListLimit => 2000,
CustomerUserPostMasterSearchFields => ['mail','givenname','sn','cn'],
CustomerUserNameFields => ['givenname', 'sn','cn','mail','sAMAccountName'],
# show not own tickets in customer panel, CompanyTickets
CustomerUserExcludePrimaryCustomerID => 0,
# add a ldap filter for valid users (expert setting)
# CustomerUserValidFilter => '(!(description=gesperrt))',
# admin can't change customer preferences
AdminSetPreferences => 0,
CacheTTL => 120,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
# [ 'UserSalutation', 'Title', 'title', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'sAMAccountName', 1, 1, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var', '', 0 ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var', '', 0 ],
# [ 'UserCustomerIDs', 'CustomerIDs', 'second_customer_ids', 1, 0, 'var', '', 0 ],
# [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var', '', 0 ],
# [ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var', '', 0 ],
# [ 'UserComment', 'Comment', 'description', 1, 0, 'var', '', 0 ],
],
};
###########################################################
###########################################################
##### Kundendaten aus AD -- Ende -- #########################
###########################################################
###########################################################