AccessControl: Add safety valve truncation for long user defined scopes (#79854)
* fix migrator bootloop by invalidating permissions
* add test for scope truncation
* lint
* fix max size scope
(cherry picked from commit 3bcde852ac)
Co-authored-by: Jo <joao.guerreiro@grafana.com>
* RBAC: Make the SplitScope migration concurrent
* Benchmark multiple alternatives: (updates in a loop, batch update, concurrent batch update)
* Only keep batching since mysql 5.7 does not seem to support concurrent batching
* Update pkg/services/accesscontrol/migrator/migrator.go
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
---------
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>