Skip to content

Commit

Permalink
fix(accesscontrol): CacheKey could not be stable
Browse files Browse the repository at this point in the history
  • Loading branch information
aruiz14 authored and moio committed Jul 31, 2024
1 parent 4787160 commit 435e220
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/accesscontrol/access_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 435e220

Please sign in to comment.