1
0
mirror of https://github.com/rancher/steve.git synced 2025-10-23 16:35:28 +00:00

fix(accesscontrol): CacheKey could not be stable

This commit is contained in:
Alejandro Ruiz
2024-07-18 09:54:14 +02:00
committed by Silvio Moioli
parent 4787160614
commit 435e220795

View File

@@ -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)
}