mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 07:35:45 -06:00
Seeder: Add missing methods to Registrations (#81961)
* add slice copy method * fix slice copy
This commit is contained in:
parent
117a4b4b0a
commit
6ac0bc5ecf
@ -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): {
|
||||
|
Loading…
Reference in New Issue
Block a user