Hi,
The following patch prevents the “New Ticket” option being show in the
self service interface if the user doesn’t have the CreateTicket right.
This should lead to less confusion, I think.
(apply in html/SelfService/Elements)
==== start ====
— Tabs.backup 2009-09-16 12:00:15.000000000 +0000
+++ Tabs 2009-09-16 12:04:02.000000000 +0000
@@ -83,14 +83,18 @@ my $tabs = { A => { title => loc('Open
},
};
-if ($queue_count > 1) {
-
$tabs->{C} = { title => loc('New ticket'),
-
path => 'SelfService/CreateTicketInQueue.html'
+if ($session{‘CurrentUser’}->HasRight( Right => ‘CreateTicket’,
-
Object => $RT::System )) {
-
if ($queue_count > 1) {
-
$tabs->{C} = { title => loc('New ticket'),
-
path =>
‘SelfService/CreateTicketInQueue.html’
};
-} else {
-
} else { $tabs->{C} = { title => loc('New ticket'), path => 'SelfService/Create.html?Queue=' . $queue_id };
-
}
}
if ($session{‘CurrentUser’}->HasRight( Right => ‘ModifySelf’,
==== end ====
It would be great to see this applied to RT. As I don’t particularly
understand RT coding style and indentation, hopefully someone can tidy
this up for me.
Thanks.