mirror of https://github.com/grafana/grafana.git
Access Control: Make it possible to exclude role grants (#91647)
This commit is contained in:
parent
89ee970ec3
commit
0e5d7633f7
|
|
@ -442,6 +442,8 @@ func (hs *HTTPServer) declareFixedRoles() error {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Grants: []string{"Editor"},
|
Grants: []string{"Editor"},
|
||||||
|
// Don't grant fixed:folders:creator to Admin
|
||||||
|
Exclude: []string{"Admin"},
|
||||||
}
|
}
|
||||||
|
|
||||||
foldersReaderRole := ac.RoleRegistration{
|
foldersReaderRole := ac.RoleRegistration{
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ var (
|
||||||
type RoleRegistration struct {
|
type RoleRegistration struct {
|
||||||
Role RoleDTO
|
Role RoleDTO
|
||||||
Grants []string
|
Grants []string
|
||||||
|
Exclude []string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Role is the model for Role in RBAC.
|
// Role is the model for Role in RBAC.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue