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

Method UnsetOrgRoleByUsername

cf/api/users.go:237–246  ·  view source on GitHub ↗
(username, orgGUID string, role models.Role)

Source from the content-addressed store, hash-verified

235}
236
237func (repo CloudControllerUserRepository) UnsetOrgRoleByUsername(username, orgGUID string, role models.Role) error {
238 rolePath, err := rolePath(role)
239 if err != nil {
240 return err
241 }
242
243 path := fmt.Sprintf("%s/v2/organizations/%s/%s", repo.config.APIEndpoint(), orgGUID, rolePath)
244
245 return repo.callAPI("DELETE", path, usernamePayload(username))
246}
247
248func (repo CloudControllerUserRepository) UnsetSpaceRoleByUsername(username, spaceGUID string, role models.Role) error {
249 rolePath := spaceRoleToPathMap[role]

Callers

nothing calls this directly

Calls 4

callAPIMethod · 0.95
rolePathFunction · 0.85
usernamePayloadFunction · 0.85
APIEndpointMethod · 0.65

Tested by

no test coverage detected