Change config value to list of strings and bump reva.

This commit is contained in:
Daniel Swärd
2023-04-18 12:25:45 +02:00
parent 1938495a89
commit 8e5ff030f7
4 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ require (
github.com/blevesearch/bleve/v2 v2.3.7
github.com/coreos/go-oidc/v3 v3.4.0
github.com/cs3org/go-cs3apis v0.0.0-20221012090518-ef2996678965
github.com/cs3org/reva/v2 v2.12.1-0.20230404090709-bb973fae26ae
github.com/cs3org/reva/v2 v2.12.1-0.20230417084429-b3d96f9db80c
github.com/disintegration/imaging v1.6.2
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
github.com/egirna/icap-client v0.1.1
+2
View File
@@ -629,6 +629,8 @@ github.com/crewjam/saml v0.4.13 h1:TYHggH/hwP7eArqiXSJUvtOPNzQDyQ7vwmwEqlFWhMc=
github.com/crewjam/saml v0.4.13/go.mod h1:igEejV+fihTIlHXYP8zOec3V5A8y3lws5bQBFsTm4gA=
github.com/cs3org/reva/v2 v2.12.1-0.20230404090709-bb973fae26ae h1:APfYubzIYqCTXtmX6cAm4c8wBYS3R/cZwomX8IlXLaI=
github.com/cs3org/reva/v2 v2.12.1-0.20230404090709-bb973fae26ae/go.mod h1:FNAYs5H3xs8v0OFmNgZtiMAzIMXd/6TJmO0uZuNn8pQ=
github.com/cs3org/reva/v2 v2.12.1-0.20230417084429-b3d96f9db80c h1:H6OjKTaRowZfAU/Hwvv4W0pLFFH/KNbHaNVNw3ANoHU=
github.com/cs3org/reva/v2 v2.12.1-0.20230417084429-b3d96f9db80c/go.mod h1:FNAYs5H3xs8v0OFmNgZtiMAzIMXd/6TJmO0uZuNn8pQ=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
+1 -1
View File
@@ -44,7 +44,7 @@ type Config struct {
DataGateway DataGateway `yaml:"data_gateway"`
OCS OCS `yaml:"ocs"`
Checksums Checksums `yaml:"checksums"`
ReadOnlyUserAttributes string `yaml:"read_only_user_attributes" env:"FRONTEND_READONLY_USER_ATTRIBUTES" desc:"Comma separated list of user attributes to indicate as read-only."`
ReadOnlyUserAttributes []string `yaml:"read_only_user_attributes" env:"FRONTEND_READONLY_USER_ATTRIBUTES" desc:"Comma separated list of user attributes to indicate as read-only."`
Middleware Middleware `yaml:"middleware"`
+5 -3
View File
@@ -4,7 +4,6 @@ import (
"net/url"
"path"
"strconv"
"strings"
"github.com/owncloud/ocis/v2/ocis-pkg/version"
"github.com/owncloud/ocis/v2/services/frontend/pkg/config"
@@ -64,7 +63,10 @@ func FrontendConfigFromStruct(cfg *config.Config) (map[string]interface{}, error
}
}
ReadOnlyUserAttributes := strings.Split(cfg.ReadOnlyUserAttributes, ",")
readOnlyUserAttributes := []string{}
if cfg.ReadOnlyUserAttributes != nil {
readOnlyUserAttributes = cfg.ReadOnlyUserAttributes
}
return map[string]interface{}{
"core": map[string]interface{}{
@@ -202,7 +204,7 @@ func FrontendConfigFromStruct(cfg *config.Config) (map[string]interface{}, error
},
"graph": map[string]interface{}{
"personal_data_export": true,
"read_only_user_attributes": ReadOnlyUserAttributes,
"read_only_user_attributes": readOnlyUserAttributes,
},
"checksums": map[string]interface{}{
"supported_types": cfg.Checksums.SupportedTypes,