I'm a newbie trying to eval OTRS for internal company use.
I have tried to find a solution by hacking the Perl files in otrs/... (especially Config.pm), lots of searches in Google and this forum.
Finally I decided my only hope was to register and post my question here.
I'm trying to find a way to explicitly set the UserCustomerID/CustomerID values independently of LDAP attribute values while using LDAP for all other data.
Goal
I need to set things up so that all Customers can search for all Customers via the Tickets > Company Tickets menu pick.
The LDAP server is only available to users on the corporate intranet, so all Customers are in the same company.
Problem
The problem is that there is no single LDAP attribute that is the same for all the users on our internal LDAP server.
Attempted Solutions
I hacked every file under otrs/... that contained the string UserCustomerID and/or CustomerID in hopes of finding where the LDAP query results populated the customer info (hoping to stream edit/replace/define the value used by otrs) but failed miserably.
I tried to find a way to pass a static value to in Config.pm but it seems to only recognize LDAP attribute names. I was hoping to change the following line in Config.pm to user a static value by changing the 'storage' value to a string and setting the 'storage-type' to something other than 'var':
Code: Select all
[ 'UserCustomerID', 'CustomerID', 'company', 0, 1, 'var', '', 0 ],
Summary
I'm hoping this is possible within the OTRS code (I don't mind having to reapply tweaks with new releases) but if not, I need to know so I can report it accurately in my eval write-up.
Let me apologize in advance if I'm in the wrong sub forum or missed the answer in my searching.
Here's my working but disguised Config.pm file:
Code: Select all
# CustomerUser
# (customer user ldap backend and settings)
$Self->{CustomerUser} = {
Name => 'LDAP Backend',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
# ldap host
Host => 'ldap1.###.###.###',
# Host => 'bay.csuhayward.edu',
# ldap base dn
BaseDN => 'dc=`###,dc=###,dc=com',
# BaseDN => 'ou=seas,o=csuh',
# 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 => '',
UserPw => '',
# 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 both your frontend and your LDAP are unicode, use this:
SourceCharset => 'utf-8',
DestCharset => 'utf-8',
# if your frontend is unicode and the charset of your
# ldap server is iso-8859-1, use these options.
# SourceCharset => 'iso-8859-1',
# DestCharset => 'utf-8',
# die if backend can't work, e. g. can't connect to server
Die => 0,
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
Params => {
port => 389,
timeout => 120,
async => 0,
version => 3,
},
},
# customer unique id
CustomerKey => 'name',
# CustomerKey => 'uid',
# customer #
CustomerID => 'name',
# CustomerID => 'mail',
CustomerUserListFields => ['cn', 'mail'],
# CustomerUserListFields => ['cn', 'mail'],
CustomerUserSearchFields => ['mail', 'cn', 'mail'],
# CustomerUserSearchFields => ['uid', 'cn', 'mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 25000000000,
# CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['name'],
CustomerUserNameFields => ['givenname', 'sn'],
# 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,
# cache time to live in sec. - cache any
# CacheTTL => 0,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'name', 1, 1, 'var', '', 0 ],
# [ 'UserLogin', 'Username', 'uid', 1, 1, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var', '', 0 ],
[ 'UserCustomerID', 'CustomerID', 'company', 0, 1, 'var', '', 0 ],
# [ 'UserCustomerID', 'CustomerID', 'department', 0, 1, 'var', '', 0 ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var', '', 0 ],
[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var', '', 0 ],
[ 'UserComment', 'Comment', 'description', 1, 0, 'var', '', 0 ],
],
};