Re: Create a new environment variable using LDAP parameters
Alexis HAUSER <[email protected]> Fri, 15 May 2020 09:45:35 +0200 (CEST)
| Newsgroups | gmane.comp.otrs.user |
|---|---|
| Message-ID | <1507697209.13074677.1589528735246.JavaMail.zimbra@imt-atlantique.fr> |
--===============6896050239397388216==
Content-Type: multipart/alternative;
boundary="=_d7c52858-53ab-433c-9f55-36ff659a6ce7"
--=_d7c52858-53ab-433c-9f55-36ff659a6ce7
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Hi,=20
Thanks for your reply.=20
I already use his mecanism but it only get the value of a LDAP attribute re=
lated to a ticket from a user.=20
I would like to get that same attribute from the current connected operator=
.=20
I was able to do something similar using the current connected operator nam=
e (if the current connected operator is the same than the owner of the tick=
et, then...) :=20
[% IF Data.OwnerID =3D=3D Env('UserID') %]=20
However, I would like now to check "if the current connected operator LDAP =
attribute "Entity" is "IT Depaterment" then...=20
But there it seems this LDAP attribute defined in Config.pm doesn't become =
an environment variable... This is why I try to get its value and create an=
environment variable in Layout.pm to be able to use it in .tt files.=20
Alexis=20
De: "Alvaro Cordero" <[email protected]>=20
=C3=80: "otrs" <[email protected]>=20
Envoy=C3=A9: Vendredi 15 Mai 2020 01:24:17=20
Objet: Re: [otrs] Create a new environment variable using LDAP parameters=
=20
Hello, there is a configuration of dynamic field to CustomerMap where you c=
an set Customer Information from LDAP resource into dynamic fields and get =
those assigned and shown in tickets, that way you don't need to modify anyt=
hing, just create the dynamic fields, map the configuration and set them in=
to Config.pm in the order you want to show.=20
Best Regards.=20
El jue., 14 may. 2020 a las 9:11, Alexis HAUSER (< [ mailto:alexis.hauser@i=
mt-atlantique.fr | [email protected] ] >) escribi=C3=B3:=20
Hi,=20
I found out that it was possible to modify Layout.pm to create a new enviro=
nment variable.=20
For example, it's possible to create a new variable called "New Variable" :=
=20
$Self->{NewVariable} =3D $ConfigObject->Get('DefaultTheme');=20
And call it inside a .tt template file using :=20
[% Env('NewVariable') %]=20
I would like to get a LDAP parameters to define it there, in the Layout.pm=
=20
This parameter is defined in Config.pm as "UserEntity", which is actually a=
parameter in our LDAP that we display on a ticket. What should I do to cre=
ate a new variable containing it's value ?=20
It seems it's not contained inside a ConfigObject but somewhere else...=20
Regards=20
---------------------------------------------------------------------=20
OTRS mailing list: otrs - Webpage: [ http://otrs.org/ | http://otrs.org/ ]=
=20
Archive: [ http://lists.otrs.org/pipermail/otrs | http://lists.otrs.org/pip=
ermail/otrs ]=20
To unsubscribe: [ http://lists.otrs.org/mailman/listinfo/otrs | http://list=
s.otrs.org/mailman/listinfo/otrs ]=20
--=20
Alvaro Cordero Retana=20
Consultor de Tecnologias=20
Tel: 22585757 ext 123=20
Email: [ mailto:[email protected] | [email protected] ]=20
---------------------------------------------------------------------=20
OTRS mailing list: otrs - Webpage: http://otrs.org/=20
Archive: http://lists.otrs.org/pipermail/otrs=20
To unsubscribe: http://lists.otrs.org/mailman/listinfo/otrs=20
--=_d7c52858-53ab-433c-9f55-36ff659a6ce7
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><body><div style=3D"font-family: arial, helvetica, sans-serif; font-s=
ize: 12pt; color: #000000"><div data-marker=3D"__QUOTED_TEXT__"><div><div s=
tyle=3D"font-family: arial, helvetica, sans-serif; font-size: 12pt; color: =
rgb(0, 0, 0);"><div>Hi,<br></div><br><br><div>Thanks for your reply.<br></d=
iv><div>I already use his mecanism but it only get the value of a LDAP attr=
ibute related to a ticket from a user.<br></div><br><div>I would like to ge=
t that same attribute from the current connected operator. <br></div><div>I=
was able to do something similar using the current connected operator name=
(if the current connected operator is the same than the owner of the ticke=
t, then...) :</div><div>[% IF Data.OwnerID =3D=3D Env('Us=
erID') %]<br></div></div><div style=3D"font-family: arial, helvetica, sans-=
serif; font-size: 12pt; color: rgb(0, 0, 0);"><br data-mce-bogus=3D"1"></di=
v><div style=3D"font-family: arial, helvetica, sans-serif; font-size: 12pt;=
color: rgb(0, 0, 0);">However, I would like now to check "if the current c=
onnected operator LDAP attribute "Entity" is "IT Depaterment" then...<br></=
div><div style=3D"font-family: arial, helvetica, sans-serif; font-size: 12p=
t; color: rgb(0, 0, 0);">But there it seems this LDAP attribute defined in =
Config.pm doesn't become an environment variable... This is why I try to ge=
t its value and create an environment variable in Layout.pm to be able to u=
se it in .tt files.<br></div><div style=3D"font-family: arial, helvetica, s=
ans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br><br><div>Alexis<br></=
div><br><br><hr id=3D"zwchr"><div><b>De: </b>"Alvaro Cordero" <alvaro@gr=
idshield.net><br><b>=C3=80: </b>"otrs" <[email protected]><br><b=
>Envoy=C3=A9: </b>Vendredi 15 Mai 2020 01:24:17<br><b>Objet: </b>Re: [otrs]=
Create a new environment variable using LDAP parameters<br></div><br><div>=
<div dir=3D"ltr">Hello, there is a configuration of dynamic field to Custom=
erMap where you can set Customer Information from LDAP resource into dynami=
c fields and get those assigned and shown in tickets, that way you don=
't need to modify anything, just create the dynamic fields, map the configu=
ration and set them into Config.pm in the order you want to show. <br>=
<div>Best Regards. </div></div><br><div class=3D"gmail_quote"><div dir=
=3D"ltr" class=3D"gmail_attr">El jue., 14 may. 2020 a las 9:11, Alexis HAUS=
ER (<<a href=3D"mailto:[email protected]" target=3D"_blank=
">[email protected]</a>>) escribi=C3=B3:<br></div><blockqu=
ote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-left: =
1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div style=3D"font-f=
amily: arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"=
><div>Hi,<br></div><br><br><div>I found out that it was possible to modify =
Layout.pm to create a new environment variable.<br></div><br><div>For examp=
le, it's possible to create a new variable called "New Variable" :</div><di=
v>$Self->{NewVariable} =3D $ConfigObject->Get('DefaultTheme');<br></d=
iv><br><div>And call it inside a .tt template file using :<br></div><div>[%=
Env('NewVariable') %]<br></div><br><div>I would like to get a LDAP paramet=
ers to define it there, in the Layout.pm<br></div><div>This parameter is de=
fined in Config.pm as "UserEntity", which is actually a parameter in our LD=
AP that we display on a ticket. What should I do to create a new variable c=
ontaining it's value ?<br></div><div>It seems it's not contained inside a C=
onfigObject but somewhere else...</div><br><br><div>Regards<br></div><br><b=
r></div></div>-------------------------------------------------------------=
--------<br>
OTRS mailing list: otrs - Webpage: <a href=3D"http://otrs.org/" rel=3D"nore=
ferrer" target=3D"_blank">http://otrs.org/</a><br>
Archive: <a href=3D"http://lists.otrs.org/pipermail/otrs" rel=3D"noreferrer=
" target=3D"_blank">http://lists.otrs.org/pipermail/otrs</a><br>
To unsubscribe: <a href=3D"http://lists.otrs.org/mailman/listinfo/otrs" rel=
=3D"noreferrer" target=3D"_blank">http://lists.otrs.org/mailman/listinfo/ot=
rs</a><br>
</blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g=
mail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr=
"><div><div dir=3D"ltr"><div><font color=3D"#666666"><i>Alvaro Cordero Reta=
na<br>Consultor de Tecnologias</i></font></div><div><font color=3D"#666666"=
><i>Tel: 22585757 ext 123</i></font></div><div><i><font color=3D"#666666">E=
mail:</font></i> <a href=3D"mailto:[email protected]" target=3D"_blank"=
>[email protected]</a><br><img src=3D"http://www.gridshield.com/images/=
gs-signature.png" saveddisplaymode=3D"" style=3D""><br></div></div></div></=
div></div></div></div></div></div>
<br>---------------------------------------------------------------------<b=
r>OTRS mailing list: otrs - Webpage: http://otrs.org/<br>Archive: http://li=
sts.otrs.org/pipermail/otrs<br>To unsubscribe: http://lists.otrs.org/mailma=
n/listinfo/otrs</div></div></div><br></div></div></body></html>
--=_d7c52858-53ab-433c-9f55-36ff659a6ce7--
--===============6896050239397388216==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/mailman/listinfo/otrs
--===============6896050239397388216==--