-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Particular plugin menu should not be displayed to unauthenticated users #4784
Comments
Fixed so that the nav will not include the app if there are no subnavs that the user has access to. This will not solve your case because Zabbix has 2 dashboard links where addToNav is set to true, which no Role assigned (defaults to Viewer). So Zabbix link will still be shown for anonymous users. https://github.com/alexanderzobnin/grafana-zabbix/blob/master/src/plugin.json#L48 |
@torkelo awesome! Thank you so much! I'll work with the zabbix plugin developer to get this fixed the rest of the way. Thanks again for such an awesome dashboard and all of your work on this! I've been watching the project for a year or two now and I'm very excited to have started using it... |
I've added the 'Editor' role to the includes and removed addToNav and have managed to get the sub menus to disappear from the menu but the Zabbix menu still appears. Could you point me in the right direction for adding a required role to the root level of the menu? A similar example might be good enough if you know of one. |
Well, I take it back. Removing addToNav completely removes it from the nav and I then can't see the menu item when logged in... When addToNav exists, but I have "role": "Editor" I can still see the menu item when logged out :-. |
whats your anonymous user role? (specified in config file in the anonymous section ) |
It's all pretty much default. org_role = Viewer for auth.anonymous |
@phutchins strange, works here, when I set role: "Editor" to one of the dashboards or pages, (in the includes section), I cannot see the main app link in nav when I am anonymous. Did you restart grafana-server ? it needs restart to reread plugin.json (also if you are modifying a plugin that has a dist folder modify the plugin json in the dist folder) |
@torkelo odd. I'm editing the plugin.json in /var/lib/grafana/plugins/alexanderzobnin-zabbix-app/ and when I made changes (and restart) I do see changes on the front end to the sub menus but the main menu is still not going away. I'm 2 days behind on the zabbix plugin so maybe I can pull updates and see if that helps... Does this look like what you're doing?
|
A panel should not have addToNav
|
I removed the addToNav as I had before and still the same outcome... Then when I log in, those two menus are missing... Any thoughts? Maybe @alexanderzobnin has an idea? |
I dont know if you guys already found a solution for this, but I could solve with deleting the includes of the dashboards in /var/lib/grafana/plugins/alexanderzobnin-zabbix-app/dist/plugin.json /var/lib/grafana/plugins/alexanderzobnin-zabbix-app/src/plugin.json And that is it Only every update of it, you have to do the procedure again Is going to be like this the file: "includes": [ "dependencies": { After that, restart grafana, and you remove the menu, wito=hout losing access to the config in "plugins" menu. Hope I could help (: |
@phutchins I'll take a look at this issue again. |
This issue was initially opened in the grafana-zabbix repo's issues but @alexanderzobnin mentioned that it was an issue with Grafana and not the plugin.
When sharing a dashboard in grafana, an unauthenticated user can click the grafana menu button in the top left and will see a Zabbix menu item. It says permission denied when it is clicked but it should not be displayed.
The Zabbix plugin's menu should not be displayed unless the user is authenticated.
Authenticated:
Unauthenticated
Please let me know if there is any additional information that I can provide that would be helpful.
Honestly, I'd love it if we had the ability to share a dashboard which did not display the menu bar at the top at all. I don't want the user to be able to change anything so I don't care about them not being able to see the time configuration.
The text was updated successfully, but these errors were encountered: