Files
coder/enterprise/cli/root.go
T
Steven Masley c61b64be61 feat: add hidden enterprise cmd command to list roles (#13303)
* feat: add hidden enterprise cmd command to list roles

This includes custom roles, and has a json ouput option for
more granular permissions
2024-05-21 13:14:00 -05:00

28 lines
474 B
Go

package cli
import (
"github.com/coder/coder/v2/cli"
"github.com/coder/serpent"
)
type RootCmd struct {
cli.RootCmd
}
func (r *RootCmd) enterpriseOnly() []*serpent.Command {
return []*serpent.Command{
r.Server(nil),
r.workspaceProxy(),
r.features(),
r.licenses(),
r.groups(),
r.provisionerDaemons(),
r.roles(),
}
}
func (r *RootCmd) EnterpriseSubcommands() []*serpent.Command {
all := append(r.CoreSubcommands(), r.enterpriseOnly()...)
return all
}