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
@@ -3,31 +3,31 @@ package command
import (
"fmt"
"github.com/owncloud/ocis/v2/extensions/user/pkg/command"
"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"
)
// UserCommand is the entrypoint for the User command.
func UserCommand(cfg *config.Config) *cli.Command {
// GroupsCommand is the entrypoint for the groups command.
func GroupsCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: cfg.User.Service.Name,
Usage: subcommandDescription(cfg.User.Service.Name),
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.User.Commons = cfg.Commons
cfg.Groups.Commons = cfg.Commons
return nil
},
Subcommands: command.GetCommands(cfg.User),
Subcommands: command.GetCommands(cfg.Groups),
}
}
func init() {
register.AddCommand(UserCommand)
register.AddCommand(GroupsCommand)
}
@@ -3,31 +3,31 @@ package command
import (
"fmt"
"github.com/owncloud/ocis/v2/extensions/group/pkg/command"
"github.com/owncloud/ocis/v2/extensions/users/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"
)
// GroupCommand is the entrypoint for the Group command.
func GroupCommand(cfg *config.Config) *cli.Command {
// UsersCommand is the entrypoint for the users command.
func UsersCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: cfg.Group.Service.Name,
Usage: subcommandDescription(cfg.Group.Service.Name),
Name: cfg.Users.Service.Name,
Usage: subcommandDescription(cfg.Users.Service.Name),
Category: "extensions",
Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil {
fmt.Printf("%v", err)
return err
}
cfg.Group.Commons = cfg.Commons
cfg.Users.Commons = cfg.Commons
return nil
},
Subcommands: command.GetCommands(cfg.Group),
Subcommands: command.GetCommands(cfg.Users),
}
}
func init() {
register.AddCommand(GroupCommand)
register.AddCommand(UsersCommand)
}