[rt-users] First Callback is not working at all

Izz Abdullah Izz.Abdullah at hibbett.com
Wed Oct 5 16:07:51 EDT 2011


Ok...so actually I have noticed this callback is not working at all.
I have placed the code Lars has below in a file called SkipTransaction (the callback used in ShowHistory) in /opt/rt4/local/html/Callbacks/hibbett/Ticket/Elements/ShowHistory
I've changed the owner using chown -R root:www-data on the Callbacks directory
I've deleted / cleared the mason cache

This callback is not seeming to work for me.  I would definitely appreciate some help here.

Thanks in advance,
Izz

-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Izz Abdullah
Sent: Wednesday, October 05, 2011 2:18 PM
To: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] Limit Ticket History View to Correspondence andCreateonly

Ok...so I did my research and found where callbacks are placed, and how.  So now I have this SkipTransaction callback, and it removes everything except for the initial Create, Correspondence, and Comments.  I have it as coded below -- /^(Correspond|Create)$/
But it would seem comments are inclusive within correspondence in the api?  I don't want unprivileged users to see comments. Any pointers?


-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Izz Abdullah
Sent: Tuesday, October 04, 2011 8:59 AM
To: rt-users at lists.bestpractical.com
Subject: [rt-users] Limit Ticket History View to Correspondence and Createonly

I want to implement this exact setting for unprivileged users.  We do not have any special callbacks, and therefore don't have a directory structure like:
/opt/rt3/local/html/Callbacks/mococo/Ticket/Elements/ShowHistory/SkipTransaction (we're using RT4.0.2, but the /opt/rt4/local/html directory is completely empty)

My question again is where would I put the SkipTransaction code from below, and from where, and I guess how, would I call it?  I'm not familiar with implementing Callbacks, so any help would be greatly appreciated.

Thanks,
Izz


-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Lars Braeuer
Sent: Thursday, September 29, 2011 12:47 PM
To: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] Limiting the information unprivileged users are ableto see via the webinterface

Hello Joop,

thanks a lot for this hint. This really saved my day. :)

Actually, I finally achieved what I wanted to do with the following (in case someone else is looking
for this):

<%init>
return if $session{'CurrentUser'}->Privileged;
my $myskip=1;

if ( $Transaction->Type =~ /^(Correspond|Create)$/ ) {
        $myskip = 0;
}
$$skip=$myskip;

</%init>

<%args>
$Transaction => undef
$skip
</%args>


This skips everything but Correspond and the initial Create message.

Also thanks to Thomas about the "return" hint.

Best regards,

Lars

--------
RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA  October 18 & 19, 2011
*  Washington DC, USA  October 31 & November 1, 2011
*  Melbourne VIC, Australia  November 28 & 29, 2011
*  Barcelona, Spain  November 28 & 29, 2011
--------
RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA  October 18 & 19, 2011
*  Washington DC, USA  October 31 & November 1, 2011
*  Barcelona, Spain  November 28 & 29, 2011



More information about the rt-users mailing list