Problemas com a pesquisa de usuário do AD - AgentTicketPhone

Post Reply
mateuskovalski
Znuny newbie
Posts: 3
Joined: 04 Feb 2013, 19:37
Znuny Version: 3.1.6
Real Name: MATEUS KOVALSKI DE MOURA
Company: Stefanini IT Solutions

Problemas com a pesquisa de usuário do AD - AgentTicketPhone

Post by mateuskovalski »

Boa tarde,

consegui fazer a integração do OTRS com o LDAP com sucesso, porém em um dos projetos que trabalho preciso buscar o cliente através de um código de funcionário no padrão 00000-0.
Já tentei dispor de várias maneiras o atributo CodFunc no campo CustomerUserSearchFields => ['CodFunc','displayName','mail','uid'], entre outras tentativas falhas. Consigo buscar por qualquer outro atributo inclusive SID da máquina (S-1-5-21-1534035700-11...) mas pelo CodFunc o sistema não busca, achei que o problema poderia ser o hífen..

Segue como fica a busca na view AgentTicketPhone quando pesquisado pelos outros valores do SearchFields: "101579-6 Fulano Fulano" <fulano.fulano@dominio.com.br fulano.fulano>

Segue minha configuração do /otrs/Kernel/Config.pm.

AlwaysFilter => '(&(mail=*))',
# if both your frontend and your LDAP are unicode, use this:
SourceCharset => 'utf-8',
DestCharset => 'utf-8',
# if your frontend is e. g. iso-8859-1 and the character set of your
# ldap server is utf-8, use these options:
# SourceCharset => 'utf-8',
# DestCharset => 'iso-8859-1',

# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
Params => {
port => 389,
scheme => 'ldap',
timeout => 120,
async => 0,
version => 3,
},
},

CustomerKey => 'uid',

CustomerID => 'uid',

CustomerUserListFields => ['CodFunc','displayName','mail','uid'],

CustomerUserSearchFields => ['CodFunc','displayName','mail','uid'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 1000,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['displayName','cn','uid'],

# show not own tickets in customer panel, CompanyTickets
CustomerUserExcludePrimaryCustomerID => 0,
# add a ldap filter for valid users (expert setting)
# admin can't change customer preferences
AdminSetPreferences => 0,
CacheTTL => 300,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly

[ 'UserTitle', 'Title', 'CodFunc', 1, 1, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'displayName', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'cn', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'uid', 1, 1, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var', '', 0 ],
[ 'UserCustomerID', 'CustomerID', 'uid', 1, 1, 'var', '', 0 ],
[ 'UserComment', 'Comment', 'description', 1, 0, 'var', '', 0 ],
[ 'UserLotacao', 'Lotacao', 'Lotacao', 1, 0, 'var', '', 0 ],
[ 'UserCI', 'CI(Computador)', 'sambaSID', 1, 0, 'var', '', 0 ],

],
};
Post Reply