| 493 | } |
| 494 | |
| 495 | func 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 | |
| 508 | func commandManifestDestructiveLevel(cmd *cobra.Command) string { |
| 509 | if levels := commandAnnotationList(cmd, commandDestructiveLevelAnnotation); len(levels) > 0 { |