(role models.Role)
| 370 | } |
| 371 | |
| 372 | func rolePath(role models.Role) (string, error) { |
| 373 | path, found := orgRoleToPathMap[role] |
| 374 | |
| 375 | if !found { |
| 376 | return "", errors.New(T("Invalid Role {{.Role}}", |
| 377 | map[string]interface{}{"Role": role})) |
| 378 | } |
| 379 | return path, nil |
| 380 | } |
| 381 | |
| 382 | func usernamePayload(username string) *strings.Reader { |
| 383 | return strings.NewReader(`{"username": "` + username + `"}`) |
no test coverage detected