plugin-tools
plugin-tools copied to clipboard
Docs: Add RBAC guide for app plugins
Migrates and reworks the RBAC guide for app plugins from https://github.com/grafana/grafana-plugin-examples/tree/main/examples/app-with-rbac
Fixes #988
Special notes for your reviewer: Please do not merge until Grafana 11.2.0 release.
Hello! 👋 This repository uses Auto for releasing packages using PR labels.
✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs.
I will create an RBAC guide for Datasource plugins separately after speaking with @ckbedwell on requirements.
Migrates and reworks the RBAC guide for app plugins from grafana/grafana-plugin-examples@
main/examples/app-with-rbac
Could you please clarify what "migrates and reworks" means? Specifically, how does this how-to guide harmonize with the existing README? Does the README need to be rewritten? Is there duplicate content there that will need to be removed?
Migrates and reworks the RBAC guide for app plugins from grafana/grafana-plugin-examples@
main/examples/app-with-rbacCould you please clarify what "migrates and reworks" means? Specifically, how does this how-to guide harmonize with the existing README? Does the README need to be rewritten? Is there duplicate content there that will need to be removed?
The existing README is based on the old method of checking permissions in the frontend using contextSrv.hasPermission rather than the new hasPermission function from @grafana/runtime (see @jackw's open PR for the changes to the example code here https://github.com/grafana/grafana-plugin-examples/compare/main...jackw%2Fmigrate-rbac-runtime).
The example README should be updated to reflect the changes (perhaps part of that same PR @jackw).
With regards to the rework portion, I've re-worded and expanded (added context) the contents from the README to be more fitting for the docs.
Very nice work. I've taken a first editorial pass on the doc and found some minor issues. Fixed them in my commits today, but take a look. I'll take a second pass after the PR is out of draft state.
Edits look good to me 👍 I'll take the PR out of draft state once 11.2.0 releases (as the code depends on changes being released then).
Thanks all. @josmperez if you're happy then we can merge this.