MCPcopy Index your code
hub / github.com/cloudfoundry/cli / checkSpaceRole

Method checkSpaceRole

cf/api/users.go:340–352  ·  view source on GitHub ↗
(spaceGUID string, role models.Role)

Source from the content-addressed store, hash-verified

338}
339
340func (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
354func (repo CloudControllerUserRepository) assocUserWithOrgByUsername(username, orgGUID string, resource interface{}) (apiErr error) {
355 path := fmt.Sprintf("/v2/organizations/%s/users", orgGUID)

Callers 1

Calls 1

NewFunction · 0.92

Tested by

no test coverage detected