Merge pull request #1061 from owncloud/remove_AccountsDataPath
get rid of unused AccountsDataPath
This commit is contained in:
6 files changed
+5
-19
No files matched your search
@@ -40,10 +40,9 @@ type GRPC struct {
|
|||||||
|
|
||||||
// Server configures a server.
|
// Server configures a server.
|
||||||
type Server struct {
|
type Server struct {
|
||||||
Version string
|
Version string
|
||||||
Name string
|
Name string
|
||||||
AccountsDataPath string
|
HashDifficulty int
|
||||||
HashDifficulty int
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Asset defines the available asset configuration.
|
// Asset defines the available asset configuration.
|
||||||
|
|||||||
@@ -119,13 +119,6 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
|||||||
EnvVars: []string{"ACCOUNTS_NAME"},
|
EnvVars: []string{"ACCOUNTS_NAME"},
|
||||||
Destination: &cfg.Server.Name,
|
Destination: &cfg.Server.Name,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
|
||||||
Name: "accounts-data-path",
|
|
||||||
Value: "/var/tmp/ocis-accounts",
|
|
||||||
Usage: "accounts folder",
|
|
||||||
EnvVars: []string{"ACCOUNTS_DATA_PATH"},
|
|
||||||
Destination: &cfg.Server.AccountsDataPath,
|
|
||||||
},
|
|
||||||
&cli.IntFlag{
|
&cli.IntFlag{
|
||||||
Name: "accounts-hash-difficulty",
|
Name: "accounts-hash-difficulty",
|
||||||
Value: 11,
|
Value: 11,
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ func init() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
cfg := config.New()
|
cfg := config.New()
|
||||||
cfg.Server.AccountsDataPath = dataPath
|
|
||||||
cfg.Repo.Disk.Path = dataPath
|
cfg.Repo.Disk.Path = dataPath
|
||||||
var hdlr *svc.Service
|
var hdlr *svc.Service
|
||||||
var err error
|
var err error
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ var (
|
|||||||
func init() {
|
func init() {
|
||||||
cfg := config.New()
|
cfg := config.New()
|
||||||
cfg.Server.Name = "accounts"
|
cfg.Server.Name = "accounts"
|
||||||
cfg.Server.AccountsDataPath = dataPath
|
|
||||||
cfg.Repo.Disk.Path = dataPath
|
cfg.Repo.Disk.Path = dataPath
|
||||||
logger := olog.NewLogger(olog.Color(true), olog.Pretty(true))
|
logger := olog.NewLogger(olog.Color(true), olog.Pretty(true))
|
||||||
roleServiceMock = buildRoleServiceMock()
|
roleServiceMock = buildRoleServiceMock()
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package service
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/gofrs/uuid"
|
"github.com/gofrs/uuid"
|
||||||
@@ -182,7 +181,6 @@ func (s Service) DeleteGroup(c context.Context, in *proto.DeleteGroupRequest, ou
|
|||||||
if id, err = cleanupID(in.Id); err != nil {
|
if id, err = cleanupID(in.Id); err != nil {
|
||||||
return merrors.InternalServerError(s.id, "could not clean up group id: %v", err.Error())
|
return merrors.InternalServerError(s.id, "could not clean up group id: %v", err.Error())
|
||||||
}
|
}
|
||||||
path := filepath.Join(s.Config.Server.AccountsDataPath, "groups", id)
|
|
||||||
|
|
||||||
g := &proto.Group{}
|
g := &proto.Group{}
|
||||||
if err = s.repo.LoadGroup(c, id, g); err != nil {
|
if err = s.repo.LoadGroup(c, id, g); err != nil {
|
||||||
@@ -212,7 +210,7 @@ func (s Service) DeleteGroup(c context.Context, in *proto.DeleteGroupRequest, ou
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err = s.index.Delete(g); err != nil {
|
if err = s.index.Delete(g); err != nil {
|
||||||
s.log.Error().Err(err).Str("id", id).Str("path", path).Msg("could not remove group from index")
|
s.log.Error().Err(err).Str("id", id).Msg("could not remove group from index")
|
||||||
return merrors.InternalServerError(s.id, "could not remove group from index: %v", err.Error())
|
return merrors.InternalServerError(s.id, "could not remove group from index: %v", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -539,9 +539,7 @@ func init() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
c := &accountsCfg.Config{
|
c := &accountsCfg.Config{
|
||||||
Server: accountsCfg.Server{
|
Server: accountsCfg.Server{},
|
||||||
AccountsDataPath: dataPath,
|
|
||||||
},
|
|
||||||
Repo: accountsCfg.Repo{
|
Repo: accountsCfg.Repo{
|
||||||
Disk: accountsCfg.Disk{
|
Disk: accountsCfg.Disk{
|
||||||
Path: dataPath,
|
Path: dataPath,
|
||||||
|
|||||||
Reference in new issue
Block a user