Reports menu - Access controls

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Reports menu - Access controls

Post by SteveBeauchemin »

I have found that I need to limit the access to some menu items.

I need to be able to stop usage of the Reports menu entirely for a class of users. There are some people who click the same thing 100 times, and hope that it will work on the 101st click. We have names for those people, yes. There are other menu items that do not work properly for the size of my site. I have too many items defined. For example, running Hypermap can ruin my day.

In order to protect my system from the clicky people, I am wondering if I can take the Reports menu away from normal users and make it available only to Admin users, or maybe have a permission list where I can allow just 'some' people to run Reports.

It would not break my heart to just have Reports no longer show at all for anyone, for now.

I know that out of the box this is not there, but I am not afraid of working with code. I need to find a solution in a short amount of time. We are experiencing some Corporate changes due to an Acquisition. There will be many new people starting to look at the Nagios XI that I run.

Please advise.

Thanks

Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Reports menu - Access controls

Post by scottwilkerson »

For right now the quick fix is this

In /usr/local/nagiosxi/html/includes/header.inc.php
replace this

Code: Select all

<div><a href="<?php echo get_base_url(); ?>reports/"><?php echo _("Reports"); ?></a></div>
with this

Code: Select all

<!--<div><a href="<?php echo get_base_url(); ?>reports/"><?php echo _("Reports"); ?></a></div>-->
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Reports menu - Access controls

Post by scottwilkerson »

Better is this to allow Admins to see them

In /usr/local/nagiosxi/html/includes/header.inc.php
replace this

Code: Select all

<div><a href="<?php echo get_base_url(); ?>reports/"><?php echo _("Reports"); ?></a></div>
with this

Code: Select all

<?php if(is_admin()) { ?><div><a href="<?php echo get_base_url(); ?>reports/"><?php echo _("Reports"); ?></a></div><?php } ?>
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: Reports menu - Access controls

Post by SteveBeauchemin »

Scott- you're awesome!!

Thank You.

Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Reports menu - Access controls

Post by scottwilkerson »

No problem, glad to help
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked