Cacti / plugin_monitor

Monitor Plugin for Cacti
GNU General Public License v2.0
36 stars 39 forks source link

Limit device view based on User Permission Settings #143

Closed fzlrhm29 closed 1 year ago

fzlrhm29 commented 3 years ago

Hi,

Can we limit a user's view in Monitor to only see devices that have been granted to them in Cacti User Permission Settings (device/tree)?

I have restricted the user to only view devices in a specific Tree (Users->Tree Permission) but the user seems to be able to view all devices in Monitor.

Appreciate your help

Thanks.

image

netniV commented 3 years ago

Are you sure that they haven't been allowed permissions at a group level?

fzlrhm29 commented 3 years ago

Do you mean to restrict the permission at User Groups level?

Yes, I have set following policy in the User Group (graph permission method is Restrictive): Graph: Allow | Device: Deny | Template: Deny | Tree: only allow one Tree

But I can still see all other devices that is not inside that specific tree group in Monitor.

Screenshot 2021-06-15 132639

Screenshot 2021-06-15 132539

Are you sure that they haven't been allowed permissions at a group level?

TheWitness commented 1 year ago

The code looks good, though I'm going to change it slightly. Keep in mind if a user has access to a single graph on a device, they have access to see the device.