[rt-users] Mapping attributes.

"Fábio M. Catunda" fcatunda at contactnet.com.br
Wed Feb 13 11:27:59 EST 2008


Craig,

Realy thanks. I will adapt it to do a search  in  a LDAP base,  thats  
exactly wha I need.

I'm not a perl mong, but this looks pretty simple.

Thanks!


Patterson, Craig escreveu:
> Fabio,
>
> I'm not completely sure what you are asking, but if you're asking how to extract the username from the email address, we do something similar. 
>
> You can override CanonicalizeUserInfo in {RT-HOME}/local/lib/RT/User_Local.pm. 
>
> ...
> my @emailAddress = $$args{'Name');
> my @results = split('@', $emailAddress);
> my $userName = $results[0];
>
> # then you want to trim the last char off...
> $userName = substr($userName, 0, length($name)-1);
>
> #Finish it up
> $$args{'Name'} = $userName;
> ...
>
> Of course, some perl wizard could probably do that in one line using regex.  
>
> Note, that I only put the snippet to grab the username.  There are examples of assigning LDAP attributes on the wiki, http://wiki.bestpractical.com/view/LDAP.
>
> Let me know if you have any more questions.
>
>
> -Craig Patterson
>
> -----Original Message-----
> From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of "Fábio M. Catunda"
> Sent: Wednesday, February 13, 2008 8:16 AM
> To: rt-users at lists.bestpractical.com
> Subject: [rt-users] Mapping attributes.
>
> Hi.
>
> I would like to know if there is some way to map users to e-mail addresses.
>
> I use LDAP for auth and I would like that a person that send an e-mail 
> to RT to have permission to see that ticket. The question is that the 
> Requestor is the e-mail of the sender, by this reason the person that 
> opened the ticket is not allowed to see that ticket.
>
> For example:
> Login: test
> E-mail: teste at mydomain.com
> When teste at mydomain.com send an e-mail to rt at mydomain.com I want the 
> requestor to be test and not teste at mydomain.com
>
> I'm using RT 3.6.1-4 debian package.
>
> Thanks for any help.
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com
>   




More information about the rt-users mailing list