[patch] [rt-users] SelfService interface probs
Robie Basak
robie at principle.co.uk
Thu Aug 22 09:55:56 EDT 2002
On Tue, 2002-08-13 at 00:18, Josh Richards wrote:
> From the SelfService interface if an unprivileged user creates a new
> ticket it is submitted properly but upon clicking the "Create Ticket"
> button they get an RT Error: "No permission to display that ticket."
> Afterwards the user can see the ticket in their list of open tickets and
> even view the details. It's like there is a race condition just after
> the ticket is submitted that creates a period right afterwards where the
> user can view the ticket they just submitted.
>
> Anyone else experience this?
Please ignore everything else I've said on the subject; that was
speculation, now I delved into the code I fixed it :)
It is a bug, and this fix is a bit of a hack; the RT interface should
really be able to deal with the fact that the user now does have
permission because the new ticket has him as a requestor.
Anyway, my fix is to just reload the ticket object with the user again,
this way it seems to pick up on the permissions.
Patch below,
Robie.
--- /usr/local/rt2/WebRT/html/SelfService/Display.html Fri Feb 8 06:23:52 2002
+++ /var/local/rt2/WebRT/html/SelfService/Display.html Thu Aug 22 14:48:45 2002
@@ -153,6 +153,12 @@
push(@results, $ErrMsg);
+ $Ticket = new RT::Ticket($session{'CurrentUser'});
+ unless ($Ticket->Load($id)) {
+ $m->comp('Error.html', Why => "Couldn't load new ticket");
+ $m->abort();
+ }
+
# }}}
}
else {
More information about the rt-users
mailing list