Mailing List Archive

Hiding menu options for particular user groups
Hello RT users,

I wanted to know if anybody had a working example or was already hiding RT
menu options from logged in users?

The first item I want to hide is the "Logout" button for all users. We're
using SSO so it's not required to be present.

The second item I would like to hide (for a specific user group) is the
RTIR menu option.

Any help or suggestions would be much appreciated,

Thank you!

Matt Coons
Re: Hiding menu options for particular user groups [ In reply to ]
I don't have a specific example, but you can hide the Logout option with an
overlay.

cp [RT path]/share/html/Elements/Tabs [RT path]/local/html/Elements

Now open the copy you just made, find the Logout option, and wrap it in a
conditional, or add to the conditions already present. You can check the
group membership of the current user, for instance. Once done, don't forget
to clear your Mason cache and restart RT:

find [RT path]/var/mason_data/obj -mindepth 1 -delete
/etc/init.d/[RT script name] restart

If you need more detailed instructions, let the list know.

On Wed, Jan 25, 2017 at 12:57 PM, Matthew Coons <coonsm@umich.edu> wrote:

> Hello RT users,
>
> I wanted to know if anybody had a working example or was already hiding RT
> menu options from logged in users?
>
> The first item I want to hide is the "Logout" button for all users. We're
> using SSO so it's not required to be present.
>
> The second item I would like to hide (for a specific user group) is the
> RTIR menu option.
>
> Any help or suggestions would be much appreciated,
>
> Thank you!
>
> Matt Coons
>
>


--
Alex Hall
Automatic Distributors, IT department
ahall@autodist.com
Re: Hiding menu options for particular user groups [ In reply to ]
https://docs.bestpractical.com/rt/4.4.1/writing_extensions.html#Adding-and-Modifying-Menus

On Wed, Jan 25, 2017 at 11:57 AM, Matthew Coons <coonsm@umich.edu> wrote:
> Hello RT users,
>
> I wanted to know if anybody had a working example or was already hiding RT
> menu options from logged in users?
>
> The first item I want to hide is the "Logout" button for all users. We're
> using SSO so it's not required to be present.
>
> The second item I would like to hide (for a specific user group) is the RTIR
> menu option.
>
> Any help or suggestions would be much appreciated,
>
> Thank you!
>
> Matt Coons
>
Re: Hiding menu options for particular user groups [ In reply to ]
Thanks Alex and Matt, this is really helpful!


Matt Coons
Incident Responder and Threat Analyst
Information & Infrastructure Assurance (IIA)
University of Michigan

734-764-4105
coonsm@umich.edu

On Wed, Jan 25, 2017 at 2:48 PM, Matt Zagrabelny <mzagrabe@d.umn.edu> wrote:

> https://docs.bestpractical.com/rt/4.4.1/writing_
> extensions.html#Adding-and-Modifying-Menus
>
> On Wed, Jan 25, 2017 at 11:57 AM, Matthew Coons <coonsm@umich.edu> wrote:
> > Hello RT users,
> >
> > I wanted to know if anybody had a working example or was already hiding
> RT
> > menu options from logged in users?
> >
> > The first item I want to hide is the "Logout" button for all users. We're
> > using SSO so it's not required to be present.
> >
> > The second item I would like to hide (for a specific user group) is the
> RTIR
> > menu option.
> >
> > Any help or suggestions would be much appreciated,
> >
> > Thank you!
> >
> > Matt Coons
> >
>
Re: Hiding menu options for particular user groups [ In reply to ]
Is there anything besides restarting apache and clearing the Mason cache
that I need to do for my changes to take effect?

I found the callbacks that reference the "logout" button in the "Tabs" file
and I commented them out.

I restarted apache and cleared the mason cache, but I still see the logout
option present. Even if I start a new session from a private webpage.

Any ideas what I may be doing wrong?

Thanks.

Matt Coons
Incident Responder and Threat Analyst
Information & Infrastructure Assurance (IIA)
University of Michigan

734-764-4105
coonsm@umich.edu

On Wed, Jan 25, 2017 at 3:03 PM, Matthew Coons <coonsm@umich.edu> wrote:

> Thanks Alex and Matt, this is really helpful!
>
>
> Matt Coons
> Incident Responder and Threat Analyst
> Information & Infrastructure Assurance (IIA)
> University of Michigan
>
> 734-764-4105 <(734)%20764-4105>
> coonsm@umich.edu
>
> On Wed, Jan 25, 2017 at 2:48 PM, Matt Zagrabelny <mzagrabe@d.umn.edu>
> wrote:
>
>> https://docs.bestpractical.com/rt/4.4.1/writing_extensions.
>> html#Adding-and-Modifying-Menus
>>
>> On Wed, Jan 25, 2017 at 11:57 AM, Matthew Coons <coonsm@umich.edu> wrote:
>> > Hello RT users,
>> >
>> > I wanted to know if anybody had a working example or was already hiding
>> RT
>> > menu options from logged in users?
>> >
>> > The first item I want to hide is the "Logout" button for all users.
>> We're
>> > using SSO so it's not required to be present.
>> >
>> > The second item I would like to hide (for a specific user group) is the
>> RTIR
>> > menu option.
>> >
>> > Any help or suggestions would be much appreciated,
>> >
>> > Thank you!
>> >
>> > Matt Coons
>> >
>>
>
>
Re: Hiding menu options for particular user groups [ In reply to ]
You're on Apache, so I doubt you're also using an FCGI server like Enginx
users have to? If you happen to be, you'll need to restart that separately,
and not worry about Apache. At least, I just restart the FCGI server and
not Nginx and it works. My only other idea is to reverse the order: clear
the cache, *then* restart Apache. I can't think of anything else you should
have to do. If it still doesn't work, check the names of your modified
files in local/html/Elements. If the file(s) you worked on there don't
match the names in share/html/Elements precisely, RT won't find and load
your versions.

On Wed, Jan 25, 2017 at 4:03 PM, Matthew Coons <coonsm@umich.edu> wrote:

> Is there anything besides restarting apache and clearing the Mason cache
> that I need to do for my changes to take effect?
>
> I found the callbacks that reference the "logout" button in the "Tabs"
> file and I commented them out.
>
> I restarted apache and cleared the mason cache, but I still see the logout
> option present. Even if I start a new session from a private webpage.
>
> Any ideas what I may be doing wrong?
>
> Thanks.
>
> Matt Coons
> Incident Responder and Threat Analyst
> Information & Infrastructure Assurance (IIA)
> University of Michigan
>
> 734-764-4105 <(734)%20764-4105>
> coonsm@umich.edu
>
> On Wed, Jan 25, 2017 at 3:03 PM, Matthew Coons <coonsm@umich.edu> wrote:
>
>> Thanks Alex and Matt, this is really helpful!
>>
>>
>> Matt Coons
>> Incident Responder and Threat Analyst
>> Information & Infrastructure Assurance (IIA)
>> University of Michigan
>>
>> 734-764-4105 <(734)%20764-4105>
>> coonsm@umich.edu
>>
>> On Wed, Jan 25, 2017 at 2:48 PM, Matt Zagrabelny <mzagrabe@d.umn.edu>
>> wrote:
>>
>>> https://docs.bestpractical.com/rt/4.4.1/writing_extensions.h
>>> tml#Adding-and-Modifying-Menus
>>>
>>> On Wed, Jan 25, 2017 at 11:57 AM, Matthew Coons <coonsm@umich.edu>
>>> wrote:
>>> > Hello RT users,
>>> >
>>> > I wanted to know if anybody had a working example or was already
>>> hiding RT
>>> > menu options from logged in users?
>>> >
>>> > The first item I want to hide is the "Logout" button for all users.
>>> We're
>>> > using SSO so it's not required to be present.
>>> >
>>> > The second item I would like to hide (for a specific user group) is
>>> the RTIR
>>> > menu option.
>>> >
>>> > Any help or suggestions would be much appreciated,
>>> >
>>> > Thank you!
>>> >
>>> > Matt Coons
>>> >
>>>
>>
>>
>


--
Alex Hall
Automatic Distributors, IT department
ahall@autodist.com
Re: Hiding menu options for particular user groups [ In reply to ]
On Wed, Jan 25, 2017 at 3:03 PM, Matthew Coons <coonsm@umich.edu> wrote:
> Is there anything besides restarting apache and clearing the Mason cache
> that I need to do for my changes to take effect?

Perhaps. What did you exactly do besides those two steps? Feel free to
copy and paste what commandline commands you ran.

> I found the callbacks that reference the "logout" button in the "Tabs" file
> and I commented them out.

Ideally you should be using the callback, not commenting it out.

> I restarted apache and cleared the mason cache, but I still see the logout
> option present. Even if I start a new session from a private webpage.
>
> Any ideas what I may be doing wrong?

Customizing RT can have a bit of a learning curve, but once you
understand the details, it is rather flexible and powerful.

All that being said, if this is your first customization, it might
take a few iterations before things start clicking.

-m