first pass RT4 merge, RT#13852
[freeside.git] / rt / share / html / Ticket / autohandler
1 <%init>
2 # Redirect to the approvals view if we're trying to get an approvals ticket
3 # Exceptions:
4 #   - Display handles redirecting for approvals itself after mobile redirect/processing
5 #   - Create doesn't have an existing ticket
6 #   - Forward and ShowEmailRecord are used by the approvals view
7 #   - anything not ending in a .html
8 my $whitelist = qr{
9     (?:/(?:Display|Create|Forward|ShowEmailRecord)\.html
10       |(?<!\.html))
11     $
12 }ix;
13
14 MaybeRedirectToApproval(
15     Whitelist   => $whitelist,
16     ARGSRef     => \%ARGS,
17 );
18
19 $m->call_next;
20 </%init>