Files
opencloud/services/graph/pkg/command/root.go
Florian Schade 56537e94fc enhancement: do not enable all roles by default.
from now on, not all unified roles are enabled by default, instead the available roles are hand-picked in the default setup.

For advanced use-cases, the administrator is capable to enable the desired set of available roles.

Picking roles is not easy since the uid is NOT humanly readable, therefore a cli is contained which lists the available, disabled and enabled roles.
2024-08-21 14:08:27 +02:00

36 lines
756 B
Go

package command
import (
"os"
"github.com/owncloud/ocis/v2/ocis-pkg/clihelper"
"github.com/urfave/cli/v2"
"github.com/owncloud/ocis/v2/services/graph/pkg/config"
)
// GetCommands provides all commands for this service
func GetCommands(cfg *config.Config) cli.Commands {
return append([]*cli.Command{
// start this service
Server(cfg),
// interaction with this service
// infos about this service
Health(cfg),
Version(cfg),
}, UnifiedRoles(cfg)...)
}
// Execute is the entry point for the ocis-graph command.
func Execute(cfg *config.Config) error {
app := clihelper.DefaultApp(&cli.App{
Name: "graph",
Usage: "Serve Graph API for oCIS",
Commands: GetCommands(cfg),
})
return app.RunContext(cfg.Context, os.Args)
}