I have the following situation. We use LDAP for customer authentication. The customers are different departments in the organization. The problem arises with customer ID since the 'company' attribute in AD is empty nor is there any attribute, to which customer ID can be sensibly mapped (at the moment I have mapped customer ID to userPrincipalName, which isn't quite the solution).
However, I could map distinguishedName to CustomerID. The distinguishedName has the following structure
Code: Select all
CN=xxxx,OU=xxxx,OU=OTRS,OU=All_Divisions,OU=Department1,OU=xxxx,DC=xxxx,DC=xxxx';
In the distinguishedName string the substring 'OU=Department1' defines the department / customer ID. So, I would like to do replace the distinguishedName string in Customer ID field based on a condition, i.e.:
Code: Select all
if CustomerID contains string 'OU=Department1:
then CustomerID = Department1 [1234]
if CustomerID contains string 'OU=Department2
then CustomerID = Department1 [1024]
.
.
.
According to
viewtopic.php?t=19847&f=64 the logic is not supported in .dtl files. In which .pm can I run the if statement so that when a new email / phone ticket is created the contents of the customer ID field are automatically changed?
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache