Merge SSH wildcard authorized users across matching rules

This commit is contained in:
Viktor Liu
2026-05-17 06:33:27 +02:00
parent a8541a1529
commit 8bf13b0d0c

View File

@@ -62,7 +62,12 @@ func applyResolvedRuleToState(
return
}
state.sshEnabled = true
state.authorizedUsers[auth.Wildcard] = cb.getAllowedUserIDs()
if state.authorizedUsers[auth.Wildcard] == nil {
state.authorizedUsers[auth.Wildcard] = make(map[string]struct{})
}
for userID := range cb.getAllowedUserIDs() {
state.authorizedUsers[auth.Wildcard][userID] = struct{}{}
}
}
}