RBAC: Feature to override default assignments (#66561)

* RBAC: Feature to override default assignments

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>

* Add test and trim spaces

* Pass linting

* Apply the rbac overrides to fixed_authentication.config_writer

* Removing from the default ini file for now

* Add grants overrides section to cfg

* slimmer handleGrantOverrides function

---------

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
This commit is contained in:
Gabriel MABILLE
2023-04-14 17:17:59 +02:00
committed by GitHub
parent 02951e8a26
commit 3b63844390
5 changed files with 106 additions and 5 deletions

View File

@@ -16,8 +16,9 @@ var ErrInternal = errutil.NewBase(errutil.StatusInternal, "accesscontrol.interna
// RoleRegistration stores a role and its assignments to built-in roles
// (Viewer, Editor, Admin, Grafana Admin)
type RoleRegistration struct {
Role RoleDTO
Grants []string
Role RoleDTO
Grants []string
AllowGrantsOverride bool
}
// Role is the model for Role in RBAC.