MCPcopy
hub / github.com/cloudfoundry/cli / CreateUser

Method CreateUser

actor/v7action/user.go:13–22  ·  view source on GitHub ↗

CreateUser creates a new user in UAA and registers it with cloud controller.

(username string, password string, origin string)

Source from the content-addressed store, hash-verified

11
12// CreateUser creates a new user in UAA and registers it with cloud controller.
13func (actor Actor) CreateUser(username string, password string, origin string) (resources.User, Warnings, error) {
14 uaaUser, err := actor.UAAClient.CreateUser(username, password, origin)
15 if err != nil {
16 return resources.User{}, nil, err
17 }
18
19 ccUser, ccWarnings, err := actor.CloudControllerClient.CreateUser(uaaUser.ID)
20
21 return resources.User(ccUser), Warnings(ccWarnings), err
22}
23
24// GetUser gets a user in UAA with the given username and (if provided) origin.
25// It returns an error if no matching user is found.

Callers

nothing calls this directly

Implementers 1

FakeActorcommand/v7/v7fakes/fake_actor.go

Calls 3

UserStruct · 0.92
WarningsTypeAlias · 0.70
CreateUserMethod · 0.65

Tested by

no test coverage detected