grafana / plugin-tools

Create Grafana plugins with ease.
https://grafana.com/developers/plugin-tools/
Apache License 2.0
58 stars 32 forks source link

Bug: App templates restrict pages to admin users #1207

Closed jackw closed 3 weeks ago

jackw commented 1 month ago

Which package(s) does this bug affect?

Package versions

5.5.3

What happened?

The plugin.json template files that are used to scaffold plugins contain page includes that are restricted to only being accessible by Admin users.

What you expected to happen

To create an app plugin with routes that are accessible by all users by default.

Restricting routes should IMHO be something a plugin developer buys into rather than accidentally creating apps that only admins have access to. Note that due to the env vars used with the developer docker env this goes unnoticed:

ENV GF_AUTH_ANONYMOUS_ORG_ROLE "Admin"
ENV GF_AUTH_ANONYMOUS_ENABLED "true"
ENV GF_AUTH_BASIC_ENABLED "false"

How to reproduce it (as minimally and precisely as possible)

  1. Scaffold plugin
  2. Login as a viewer
  3. Notice that there are no links to any app pages

Environment

N/A

Additional context

This likely needs addressing in our plugin-examples repo too.

grafana-plugins-platform-bot[bot] commented 3 weeks ago

:rocket: Issue was released in @grafana/create-plugin@5.7.2 :rocket: