(cfg config.Config)
| 50 | } |
| 51 | |
| 52 | func CheckAuth(cfg config.Config) error { |
| 53 | if cfg.Profile().Name == "" { |
| 54 | cfg.Profile().LoadDefault() |
| 55 | } |
| 56 | |
| 57 | _, err := cfg.Profile().GetApplicationID() |
| 58 | if err != nil { |
| 59 | return err |
| 60 | } |
| 61 | _, err = cfg.Profile().GetAPIKey() |
| 62 | if err != nil { |
| 63 | return err |
| 64 | } |
| 65 | |
| 66 | return nil |
| 67 | } |
| 68 | |
| 69 | // CheckACLs check if the current profile has the right ACLs to execute the command |
| 70 | func CheckACLs(cmd *cobra.Command, f *cmdutil.Factory) error { |
nothing calls this directly
no test coverage detected