[v11.0.x] Data source: Maintain the default data source permissions when switching from unlicensed to licensed Grafana #87142
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport 5e060d2 from #87119
What is this feature?
Ensures that the default data source permissions for Viewers and Editors remain intact (as in, Viewers and Editors can query data sources) when switching from an unlicensed to licensed Grafana instance.
Why do we need this feature?
To ensure a smooth transition from unlicensed to licensed instances.
Who is this feature for?
Any users whose workflow involves configuring their data sources before setting a license token.
Which issue(s) does this PR fix?:
Fixes https://github.com/grafana/identity-access-team/issues/672
Special notes for your reviewer:
Note that this does not expose any extra functionality to OSS/unlicensed instances - users still can't customize data source permissions for these instances. This only ensures that the default permissions (Viewers and Editors can query) stays when switching to a licensed instance.
With this fix we could technically also add a migration and remove this bit of code. However, I think it's not worth it, as the code cleanup gain doesn't make up for dealing with all the migration pains.
Enterprise PR: https://github.com/grafana/grafana-enterprise/pull/6556