Closed MSS970 closed 7 months ago
I ran the relevant select statement in MySQL database and I got the expected correct results.
SELECT FROM ( SELECT '0' AS id, 'Everyone' AS name, 'All Users in System' AS description, 'special' AS type, '-1' AS allowed, 'N/A' AS realm UNION ALL SELECT id, username AS name, full_name AS description, 'user' AS type, wa.mapid AS allowed, realm FROM user_auth AS ua LEFT JOIN (SELECT FROM weathermap_auth WHERE mapid = 16) AS wa ON ua.id = wa.userid AND ua.enabled = 'on' WHERE (wa.mapid = 16 OR (wa.mapid IS NULL AND ua.enabled = 'on')) -- $sql_where1 UNION ALL SELECT id, name, description, 'group' AS type, wa.mapid AS allowed, 'N/A' AS realm FROM user_auth_group AS uag LEFT JOIN (SELECT * FROM weathermap_auth WHERE mapid = 16) AS wa ON uag.id = -wa.userid AND uag.enabled = 'on' WHERE (wa.mapid = 16 OR (wa.mapid IS NULL AND uag.enabled = 'on')) -- $sql_where2 ) AS rs
No sure if the bug is due to $sql_params[]
I have the same after a Cacti migration from 0.8.8h to 1.2.26. Seems like the view show only active users. If you have old permissions of inactive users, it will be count but not showed in the permissions view.
Oh!
Update to develop
wait for one WeatherMap polling cycle to complete, and then see if the stats are better.
I can't confirm, before your fix I deleted entries in weathermap_auth to clean all rights.
Okay, well they will be fixed now. Thanks for the update. Let's just consider this one closed. Oh, but wait!
It's good. There was one check that I was not certain of "All Users".
a) Click on Management/Weathermaps b) Then click on any of the Accessible By to show and edit he permissions, e.g. click on the “2 Groups5 Users”, it is supposed to list the following: