(spaceGUID string, role models.Role)
| 338 | } |
| 339 | |
| 340 | func (repo CloudControllerUserRepository) checkSpaceRole(spaceGUID string, role models.Role) (string, error) { |
| 341 | var apiErr error |
| 342 | |
| 343 | rolePath, found := spaceRoleToPathMap[role] |
| 344 | |
| 345 | if !found { |
| 346 | apiErr = errors.New(T("Invalid Role {{.Role}}", |
| 347 | map[string]interface{}{"Role": role})) |
| 348 | } |
| 349 | |
| 350 | apiPath := fmt.Sprintf("/v2/spaces/%s/%s", spaceGUID, rolePath) |
| 351 | return apiPath, apiErr |
| 352 | } |
| 353 | |
| 354 | func (repo CloudControllerUserRepository) assocUserWithOrgByUsername(username, orgGUID string, resource interface{}) (apiErr error) { |
| 355 | path := fmt.Sprintf("/v2/organizations/%s/users", orgGUID) |
no test coverage detected