Selfservice Display error

I’m in the midst of majoring tweaking up an RT instance… and discovering
all of the cool addons and also learning the features & quirks of it all.
RT rocks!

I installed Jesse’s autopassword template which is nice because it
will allow users to get a autogenerated password, which makes web status
checking possible easily and quickly.

So I logged on and it works nicely in selfservice mode, with a few notable
issues:

  1. SelfService/Update.html allows status changing (a dropdown box) even if
    it’s not valid. I just commented out the Status section and that works
    well. Since they can’t change it, it’s fine.

  2. SelfService/Create.html works fine, but once the user submits, the
    Display.html code runs, and they get an error: No permission to view the
    ticket.

Except once they click on the Open Tickets, they can see it.

Looks like a timing issue or something… Like it’s not processing the
ticket before it tries to display the Transaction. Removing the code
below, it still doesn’t show the Transaction, though the rest of the
settings do display.

Permissions: Requestor can Show Ticket, Everyone can
CreateTicket, ReplyToTicket, SeeQueue

Code is:

unless ($session{‘CurrentUser’}->HasQueueRight ( TicketObj => $Ticket,
Right => ‘ShowTicket’)) {
$m->comp(‘Error.html’, Why => “No permission to display that ticket”);
$m->abort();
}

Minor bug, I think.

Seth Cohn, General Manager of Eugene Free Community Network gm@efn.org

Businesses planned for service are apt to succeed; Phone 541-484-9637

Businesses planned for profit are apt to fail. - N. Butler

Seth Cohn, EFN General Manager wrote:

unless ($session{‘CurrentUser’}->HasQueueRight ( TicketObj => $Ticket,
Right => ‘ShowTicket’)) {
$m->comp(‘Error.html’, Why => “No permission to display that ticket”);
$m->abort();
}

I don’t use SelfService, so this is untested, but try replacing that with

unless ($Ticket->CurrentUserHasRight(‘ShowTicket’)) {
$m->comp(‘Error.html’, Why => “No permission to display that ticket”);
$m->abort();
}

and see if it helps?
Phil Homewood, Systems Janitor, www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances

I don’t use SelfService, so this is untested, but try replacing that with

unless ($Ticket->CurrentUserHasRight(‘ShowTicket’)) {
$m->comp(‘Error.html’, Why => “No permission to display that ticket”);
$m->abort();
}

and see if it helps?

Nope. Clearly, when the code executes, the CurrentUser is not yet the
Requestor of the ticket. That doesn’t make sense, sinc Create.html is
calling Display.html, and it should have created the ticket (and made the
user the requestor) before it attempts to display it.

Seth