NagiosBPI BETA permissions alteration
Posted: Mon Jun 25, 2012 5:26 pm
We have a need in the BPI plugin, that by default nothing should be hidden.
We keep a relatively clean list of the applications in the plugin, so the main page does not get to cluttered in the first place, and users can drill down from there to see things they would like to see.
The BPI Beta, DOES allow us to allow people to see, if they are assigned, but in order to keep things open and visible, we need to manually go through and add EVERY user to EVERY BPI group that exists.
Each time a user is added, they will have to be added to EVERY BPI group that exists.
With hundreds of users, this is becoming a nightmare to control/maintain.
I am trying to tweak the component, to allow a global visibility flag, but have run into a hitch.
Editing functions/bpi_functions.php:is_authorized_for_bpi_group() I can force a return true for all.
This has worked for top level elements, but it does not show children, unless its a host (image attached) While an admin user can see: If the user is granted (has ability to view all hosts & services) in the XI admin, it sees things just fine.
So... this is my theory...
It looks like the XML that is pulled from the backend is based on the logged in user.
If that user does not have access to view all hosts & services under a group, somehting errors out, and causes the output under said group to simply not output. (the ajax data that comes back has a hidden UL for the sub-group, but nothing in it)
If that sounds correct, how can I override the backend user that is being used to query the data?
I dug for a while, but could not find much as far as documentation on the functions used to query the data... Rather than spin my wheels, Ill ask for directions.
Thanks
I concede that it is also possible that its doing a DB query to get this data... but I am not sure.
We keep a relatively clean list of the applications in the plugin, so the main page does not get to cluttered in the first place, and users can drill down from there to see things they would like to see.
The BPI Beta, DOES allow us to allow people to see, if they are assigned, but in order to keep things open and visible, we need to manually go through and add EVERY user to EVERY BPI group that exists.
Each time a user is added, they will have to be added to EVERY BPI group that exists.
With hundreds of users, this is becoming a nightmare to control/maintain.
I am trying to tweak the component, to allow a global visibility flag, but have run into a hitch.
Editing functions/bpi_functions.php:is_authorized_for_bpi_group() I can force a return true for all.
This has worked for top level elements, but it does not show children, unless its a host (image attached) While an admin user can see: If the user is granted (has ability to view all hosts & services) in the XI admin, it sees things just fine.
So... this is my theory...
It looks like the XML that is pulled from the backend is based on the logged in user.
If that user does not have access to view all hosts & services under a group, somehting errors out, and causes the output under said group to simply not output. (the ajax data that comes back has a hidden UL for the sub-group, but nothing in it)
If that sounds correct, how can I override the backend user that is being used to query the data?
I dug for a while, but could not find much as far as documentation on the functions used to query the data... Rather than spin my wheels, Ill ask for directions.
Thanks
I concede that it is also possible that its doing a DB query to get this data... but I am not sure.