rename users and groups extensions

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2022-05-05 08:50:18 +00:00
parent 2b6220d790
commit 51e1aa2978
47 changed files with 112 additions and 112 deletions

View File

@@ -0,0 +1,33 @@
package command
import (
"fmt"
"github.com/owncloud/ocis/v2/extensions/groups/pkg/command"
"github.com/owncloud/ocis/v2/ocis-pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
"github.com/owncloud/ocis/v2/ocis/pkg/register"
"github.com/urfave/cli/v2"
)
// GroupsCommand is the entrypoint for the groups command.
func GroupsCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: cfg.Groups.Service.Name,
Usage: subcommandDescription(cfg.Groups.Service.Name),
Category: "extensions",
Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err)
return err
}
cfg.Groups.Commons = cfg.Commons
return nil
},
Subcommands: command.GetCommands(cfg.Groups),
}
}
func init() {
register.AddCommand(GroupsCommand)
}