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

Method RequireCurrentUser

actor/sharedaction/check_target.go:33–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31}
32
33func (actor Actor) RequireCurrentUser() (string, error) {
34 if !actor.IsLoggedIn() {
35 return "", actionerror.NotLoggedInError{
36 BinaryName: actor.Config.BinaryName(),
37 }
38 }
39
40 return actor.Config.CurrentUserName()
41}
42
43func (actor Actor) RequireTargetedOrg() (string, error) {
44 if !actor.IsOrgTargeted() {

Callers

nothing calls this directly

Implementers 1

FakeActorcommand/v7/v7fakes/fake_actor.go

Calls 3

IsLoggedInMethod · 0.65
BinaryNameMethod · 0.65
CurrentUserNameMethod · 0.65

Tested by

no test coverage detected