Re: [rt-users] Hide "Bulk Update" from menu

2015-12-27 Thread Daniel Schwager
Hi Matt,
 
thanks for your help. In the previous E-Mail (the enter-key was faster than 
me!) you found my implementation of hiding the "Bulk Update" menu dependent of 
the membership.

Best regards
Danny



smime.p7s
Description: S/MIME cryptographic signature


Re: [rt-users] Hide "Bulk Update" from menu

2015-12-22 Thread Matt Zagrabelny
Hi Daniel,

On Tue, Dec 22, 2015 at 10:18 AM, Daniel Schwager
 wrote:
> Hi everybody,
>
> is there a possibility to hide the "Bulk Update" menu from every privileged 
> user who is not member of a "Bulk-Update"-Group?

Maybe.


> I cannot find a corresponding Callback in share/html/Elements/Tabs
> nor ./share/html/Search/Results.html to change the menu hiding "Bulk Update".

We remove the "Reply" action from the menu. The callback file is:

/Elements/Tabs/Privileged

Here is the contents:

<%init>
# Now (and only to the Privileged) remove the default Reply link.
# We add a "Reply" link (with status=open) via the life cycle.
if (
$Path =~ m{/Ticket/}
&&
$DECODED_ARGS->{id}
&&
$DECODED_ARGS->{id} =~ /^\d+$/
) {
my $Ticket = RT::Ticket->new($session{CurrentUser});
$Ticket->Load($DECODED_ARGS->{id});
if (
$Ticket
&&
$Ticket->Status eq 'new'
) {
# Remove the "Reply" link from the actions...
if (my $actions = PageMenu->child('actions')) {
$actions->delete('reply');
}
}
}

<%args>
$Path


You should be able to tweak other parts of the tabs. Using some of the
code above as a guide.

Cheers,

-m