mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Seeder: Add missing methods to Registrations (#81961)
* add slice copy method * fix slice copy
This commit is contained in:
@@ -381,6 +381,14 @@ func (m *RegistrationList) Range(f func(registration RoleRegistration) bool) {
|
||||
}
|
||||
}
|
||||
|
||||
func (m *RegistrationList) Slice() []RoleRegistration {
|
||||
m.mx.RLock()
|
||||
defer m.mx.RUnlock()
|
||||
out := make([]RoleRegistration, len(m.registrations))
|
||||
copy(out, m.registrations)
|
||||
return out
|
||||
}
|
||||
|
||||
func BuildBasicRoleDefinitions() map[string]*RoleDTO {
|
||||
return map[string]*RoleDTO{
|
||||
string(org.RoleAdmin): {
|
||||
|
||||
Reference in New Issue
Block a user