mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 04:09:40 -06:00
rename users and groups extensions
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
33
ocis/pkg/command/groups.go
Normal file
33
ocis/pkg/command/groups.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user