MCPcopy Create free account
hub / github.com/openclaw/gogcli / requireAdminAccount

Function requireAdminAccount

internal/cmd/admin_common.go:92–104  ·  view source on GitHub ↗
(flags *RootFlags)

Source from the content-addressed store, hash-verified

90}
91
92func requireAdminAccount(flags *RootFlags) (string, error) {
93 account, err := requireAccount(flags)
94 if err != nil {
95 return "", err
96 }
97 if isConsumerAccount(account) {
98 return "", errfmt.NewUserFacingError(
99 "Admin SDK Directory API requires a Google Workspace account with domain-wide delegation; consumer accounts (gmail.com/googlemail.com) are not supported.",
100 nil,
101 )
102 }
103 return account, nil
104}
105
106// wrapAdminDirectoryError provides helpful error messages for common Admin SDK issues.
107func wrapAdminDirectoryError(err error, account string) error {

Callers 15

RunMethod · 0.85
RunMethod · 0.85
RunMethod · 0.85
RunMethod · 0.85
RunMethod · 0.85
buildAdminBackupSnapshotFunction · 0.85
RunMethod · 0.85
RunMethod · 0.85
RunMethod · 0.85
RunMethod · 0.85
RunMethod · 0.85
RunMethod · 0.85

Calls 3

NewUserFacingErrorFunction · 0.92
requireAccountFunction · 0.85
isConsumerAccountFunction · 0.85

Tested by 1