diff --git a/pkg/accesscontrol/access_store.go b/pkg/accesscontrol/access_store.go index a4ece860..51f7269b 100644 --- a/pkg/accesscontrol/access_store.go +++ b/pkg/accesscontrol/access_store.go @@ -76,11 +76,11 @@ func (l *AccessStore) CacheKey(user user.Info) string { l.users.addRolesToHash(d, user.GetName()) groupBase := user.GetGroups() - groups := make([]string, 0, len(groupBase)) + groups := make([]string, len(groupBase)) copy(groups, groupBase) - sort.Strings(groups) - for _, group := range user.GetGroups() { + + for _, group := range groups { l.groups.addRolesToHash(d, group) }