make user provider config similar to other services

This commit is contained in:
David Christofas
2022-04-25 15:43:23 +02:00
parent b31b70890f
commit ed4e9ee866
9 changed files with 477 additions and 204 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
package command
import (
"github.com/owncloud/ocis/extensions/storage/pkg/command"
"github.com/owncloud/ocis/extensions/user/pkg/command"
"github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
"github.com/urfave/cli/v2"
@@ -14,11 +14,11 @@ func StorageUserProviderCommand(cfg *config.Config) *cli.Command {
Usage: "start storage userprovider service",
Category: "extensions",
//Flags: flagset.UsersWithConfig(cfg.Storage),
Before: func(ctx *cli.Context) error {
return ParseStorageCommon(ctx, cfg)
},
// Before: func(ctx *cli.Context) error {
// return ParseStorageCommon(ctx, cfg)
// },
Action: func(c *cli.Context) error {
origCmd := command.Users(cfg.Storage)
origCmd := command.User(cfg.User)
return handleOriginalAction(c, origCmd)
},
}
+2 -1
View File
@@ -34,6 +34,7 @@ import (
storage "github.com/owncloud/ocis/extensions/storage/pkg/command"
store "github.com/owncloud/ocis/extensions/store/pkg/command"
thumbnails "github.com/owncloud/ocis/extensions/thumbnails/pkg/command"
user "github.com/owncloud/ocis/extensions/user/pkg/command"
web "github.com/owncloud/ocis/extensions/web/pkg/command"
webdav "github.com/owncloud/ocis/extensions/webdav/pkg/command"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
@@ -110,7 +111,7 @@ func NewService(options ...Option) (*Service, error) {
s.ServicesRegistry["storage-frontend"] = storage.NewFrontend
s.ServicesRegistry["ocdav"] = storage.NewOCDav
s.ServicesRegistry["storage-gateway"] = storage.NewGateway
s.ServicesRegistry["storage-userprovider"] = storage.NewUserProvider
s.ServicesRegistry["storage-userprovider"] = user.NewUserProvider
s.ServicesRegistry["storage-groupprovider"] = storage.NewGroupProvider
s.ServicesRegistry["storage-authbasic"] = authbasic.NewAuthBasic
s.ServicesRegistry["storage-authbearer"] = storage.NewAuthBearer