(usersWithRole []resources.User, roleLabel string)
| 63 | } |
| 64 | |
| 65 | func (cmd SpaceUsersCommand) displayRoleGroup(usersWithRole []resources.User, roleLabel string) { |
| 66 | v7action.SortUsers(usersWithRole) |
| 67 | |
| 68 | cmd.UI.DisplayHeader(roleLabel) |
| 69 | if len(usersWithRole) > 0 { |
| 70 | for _, userWithRole := range usersWithRole { |
| 71 | cmd.UI.DisplayText(" {{.PresentationName}} ({{.Origin}})", map[string]interface{}{ |
| 72 | "PresentationName": userWithRole.PresentationName, |
| 73 | "Origin": v7action.GetHumanReadableOrigin(userWithRole), |
| 74 | }) |
| 75 | } |
| 76 | } else { |
| 77 | cmd.UI.DisplayText(" No {{.RoleLabel}} found", map[string]interface{}{ |
| 78 | "RoleLabel": roleLabel, |
| 79 | }) |
| 80 | } |
| 81 | |
| 82 | cmd.UI.DisplayNewline() |
| 83 | } |
no test coverage detected