plugin-tools icon indicating copy to clipboard operation
plugin-tools copied to clipboard

Docs: Add RBAC guide for app plugins

Open tomglenn opened this issue 1 year ago • 5 comments

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.

tomglenn avatar Jul 19 '24 11:07 tomglenn

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.

github-actions[bot] avatar Jul 19 '24 11:07 github-actions[bot]

I will create an RBAC guide for Datasource plugins separately after speaking with @ckbedwell on requirements.

tomglenn avatar Jul 19 '24 11:07 tomglenn

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?

josmperez avatar Jul 19 '24 19:07 josmperez

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?

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.

tomglenn avatar Jul 22 '24 08:07 tomglenn

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).

tomglenn avatar Jul 22 '24 08:07 tomglenn

Thanks all. @josmperez if you're happy then we can merge this.

tomglenn avatar Aug 28 '24 09:08 tomglenn