[rt-users] Mapping attributes.

"Fábio M. Catunda" fcatunda at contactnet.com.br
Tue Feb 19 10:10:21 EST 2008


Hi Craig,

I searched for

my @emailAddress = $$args{'Name');

inside the file that you sent me but I couldnt find. I was wondering to put my modifications at the same place. Are you sure that this is your User_Local.pm file?

Thankz!


Patterson, Craig escreveu:
> I'm not sure if you wanted this who file or not, but here is our version of User_Local.pm  
>
> We use AD and it's got a lot of LDAP stuff in it.  
>
> -----Original Message-----
> From: "Fábio M. Catunda" [mailto:fcatunda at contactnet.com.br] 
> Sent: Monday, February 18, 2008 9:00 AM
> To: Patterson, Craig
> Subject: Re: [rt-users] Mapping attributes.
>
> Craig,
>
> Sorry to botter you, but I'm a little afraid to crash RT here... it's in 
> a production enviroment!
>
> I don't have a User_Local.pm file, I just have a User.pm. Should I 
> create a User_local.pm or modify the User.pm?
>
> 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