Fix typo in group removed warning

Signed-off-by: Monis Khan <mok@vmware.com>
This commit is contained in:
Monis Khan
2022-03-02 12:03:22 -05:00
parent 541811a7a6
commit eae55a8595
2 changed files with 12 additions and 7 deletions

View File

@@ -416,12 +416,12 @@ func getDownstreamGroupsFromPinnipedSession(session *psession.PinnipedSession) (
return downstreamGroups, nil
}
func warnIfGroupsChanged(ctx context.Context, oldGroups []string, refreshedGroups []string, username string) {
added, removed := diffSortedGroups(oldGroups, refreshedGroups)
func warnIfGroupsChanged(ctx context.Context, oldGroups, newGroups []string, username string) {
added, removed := diffSortedGroups(oldGroups, newGroups)
if len(added) > 0 {
warning.AddWarning(ctx, "", fmt.Sprintf("User %q has been added to the following groups: %q", username, added))
}
if len(removed) > 0 {
warning.AddWarning(ctx, "", fmt.Sprintf("User %q has been removed from the following groups: %q: ", username, removed))
warning.AddWarning(ctx, "", fmt.Sprintf("User %q has been removed from the following groups: %q", username, removed))
}
}