(userGUID string)
| 198 | } |
| 199 | |
| 200 | func (repo CloudControllerUserRepository) Delete(userGUID string) (apiErr error) { |
| 201 | path := fmt.Sprintf("/v2/users/%s", userGUID) |
| 202 | |
| 203 | apiErr = repo.ccGateway.DeleteResource(repo.config.APIEndpoint(), path) |
| 204 | |
| 205 | if httpErr, ok := apiErr.(errors.HTTPError); ok && httpErr.ErrorCode() != errors.UserNotFound { |
| 206 | return |
| 207 | } |
| 208 | uaaEndpoint, apiErr := repo.getAuthEndpoint() |
| 209 | if apiErr != nil { |
| 210 | return |
| 211 | } |
| 212 | |
| 213 | path = fmt.Sprintf("/Users/%s", userGUID) |
| 214 | return repo.uaaGateway.DeleteResource(uaaEndpoint, path) |
| 215 | } |
| 216 | |
| 217 | func (repo CloudControllerUserRepository) SetOrgRoleByGUID(userGUID string, orgGUID string, role models.Role) (err error) { |
| 218 | path, err := userGUIDPath(repo.config.APIEndpoint(), userGUID, orgGUID, role) |
nothing calls this directly
no test coverage detected