MCPcopy Create free account
hub / github.com/dropbox/dbxcli / commandManifestAuthModes

Function commandManifestAuthModes

cmd/help_json.go:495–506  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

493}
494
495func commandManifestAuthModes(cmd *cobra.Command) []string {
496 if modes := commandAnnotationList(cmd, commandAuthModesAnnotation); modes != nil {
497 return modes
498 }
499 if cmd == nil || cmd.Root() == cmd || !cmd.Runnable() || commandSkipsAuth(cmd) || isNoAuthCommand(cmd) {
500 return []string{}
501 }
502 if commandHasTopLevelName(cmd, "team") {
503 return []string{authTokenTypeName(tokenTeamManage)}
504 }
505 return []string{authTokenTypeName(tokenPersonal), authTokenTypeName(tokenTeamAccess)}
506}
507
508func commandManifestDestructiveLevel(cmd *cobra.Command) string {
509 if levels := commandAnnotationList(cmd, commandDestructiveLevelAnnotation); len(levels) > 0 {

Calls 5

commandAnnotationListFunction · 0.85
commandSkipsAuthFunction · 0.85
isNoAuthCommandFunction · 0.85
commandHasTopLevelNameFunction · 0.85
authTokenTypeNameFunction · 0.85