(role codersdk.Role)
| 500 | } |
| 501 | |
| 502 | func roleToTableView(role codersdk.Role) roleTableRow { |
| 503 | return roleTableRow{ |
| 504 | Name: role.Name, |
| 505 | DisplayName: role.DisplayName, |
| 506 | OrganizationID: role.OrganizationID, |
| 507 | SitePermissions: fmt.Sprintf("%d permissions", len(role.SitePermissions)), |
| 508 | OrganizationPermissions: fmt.Sprintf("%d permissions", len(role.OrganizationPermissions)), |
| 509 | UserPermissions: fmt.Sprintf("%d permissions", len(role.UserPermissions)), |
| 510 | } |
| 511 | } |
| 512 | |
| 513 | func existingRole(newRoleName string, existingRoles []codersdk.AssignableRoles) *codersdk.AssignableRoles { |
| 514 | for _, existingRole := range existingRoles { |
no outgoing calls
no test coverage detected