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

Matt Zagrabelny mzagrabe at d.umn.edu
Tue Dec 22 11:28:22 EST 2015


Hi Daniel,

On Tue, Dec 22, 2015 at 10:18 AM, Daniel Schwager
<Daniel.Schwager at dtnet.de> 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');
        }
    }
}
</%init>
<%args>
$Path
</%args>

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

Cheers,

-m



More information about the rt-users mailing list