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