RBAC: Remove the option to disable RBAC and add automated permission migrations for instances that had RBAC disabled (#66652)

* RBAC: Stop reading enabeld from ini file and always set to true

* Migrations: Add a migration for rbac to reset data migrations if rbac
was disabled

* If rbac was disabled we reset the data and data migrations that rbac
  has to perform to get it to a correct state

* Migrator: Store migration logs on migrator and add function to clear it from the
in-memory stored logs

* update tests

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
This commit is contained in:
Ieva
2023-04-19 16:34:19 +01:00
committed by GitHub
co-authored by Karl Persson
parent 772d00b28f
commit 035bf29146
7 changed files with 110 additions and 6 deletions
@@ -61,6 +61,7 @@ func (*OSSMigrations) AddMigration(mg *Migrator) {
accesscontrol.AddMigration(mg)
addQueryHistoryMigrations(mg)
accesscontrol.AddDisabledMigrator(mg)
accesscontrol.AddTeamMembershipMigrations(mg)
accesscontrol.AddDashboardPermissionsMigrator(mg)
accesscontrol.AddAlertingPermissionsMigrator(mg)