use settings user

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
jkoberg
2022-03-07 10:47:29 +01:00
parent 0af1c98d38
commit 7bfeb162bc
6 changed files with 6 additions and 7 deletions

View File

@@ -60,7 +60,7 @@ func DefaultConfig() *Config {
},
ServiceUser: ServiceUser{
UUID: "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
Username: "",
Username: "service user",
UID: 0,
GID: 0,
},

View File

@@ -45,7 +45,7 @@ func DefaultConfig() *Config {
Metadata: Metadata{
GatewayAddress: "127.0.0.1:9142",
StorageAddress: "127.0.0.1:9215",
ServiceUserID: "ddc2004c-0977-11eb-9d3f-a793888cd0f8",
ServiceUserID: "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
MachineAuthAPIKey: "change-me-please",
},
}

View File

@@ -45,7 +45,7 @@ func NewService(cfg *config.Config, logger log.Logger) Service {
service.manager = metastore.New(cfg)
case "filesystem":
service.manager = filestore.New(cfg)
// TODO: if we want to further support filesystem store it should use default permissions from store/defaults.go instead using this duplicate
// TODO: if we want to further support filesystem store it should use default permissions from store/defaults/defaults.go instead using this duplicate
service.RegisterDefaultRoles()
}
return service

View File

@@ -7,6 +7,7 @@ import (
olog "github.com/owncloud/ocis/ocis-pkg/log"
settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0"
"github.com/owncloud/ocis/settings/pkg/config"
"github.com/stretchr/testify/require"
)
@@ -17,6 +18,7 @@ var (
s = &Store{
Logger: logger,
l: &sync.Mutex{},
cfg: config.DefaultConfig(),
}
logger = olog.NewLogger(

View File

@@ -50,7 +50,7 @@ func (s *Store) ListBundles(bundleType settingsmsg.Bundle_Type, bundleIDs []stri
return bundles, nil
}
// ReadBundle tries to find a bundle by the given id within the dataPath.
// ReadBundle tries to find a bundle by the given id from the metadata service
func (s *Store) ReadBundle(bundleID string) (*settingsmsg.Bundle, error) {
if s.mdc == nil {
return defaultBundle(settingsmsg.Bundle_TYPE_ROLE, bundleID)[0], nil

View File

@@ -2,7 +2,6 @@ package store
import (
"context"
"fmt"
"path"
"strings"
"time"
@@ -78,9 +77,7 @@ func (c *CachedMDC) ReadDir(ctx context.Context, id string) ([]string, error) {
return i.([]string), nil
}
fmt.Println("readdir calling metadataservice", id)
s, err := c.next.ReadDir(ctx, id)
fmt.Println("readdir calling metadataservice result", s, err)
if err != nil {
return nil, err
}