Merge branch 'master' into initialization-responsibility
This commit is contained in:
commit
5d98dbac4a
30 files changed
+804
-71
No files matched your search
@@ -6,11 +6,20 @@ The following sections list the changes for unreleased.
|
||||
|
||||
## Summary
|
||||
|
||||
* Bugfix - Fix the ttl of the authentication middleware cache: [#1699](https://github.com/owncloud/ocis/pull/1699)
|
||||
* Change - Update ownCloud Web to v2.0.1: [#1683](https://github.com/owncloud/ocis/pull/1683)
|
||||
* Enhancement - Update go-micro to v3.5.1-0.20210217182006-0f0ace1a44a9: [#1670](https://github.com/owncloud/ocis/pull/1670)
|
||||
* Enhancement - Add initial nats and kubernetes registry support: [#1697](https://github.com/owncloud/ocis/pull/1697)
|
||||
|
||||
## Details
|
||||
|
||||
* Bugfix - Fix the ttl of the authentication middleware cache: [#1699](https://github.com/owncloud/ocis/pull/1699)
|
||||
|
||||
The authentication cache ttl was multiplied with `time.Second` multiple times. This
|
||||
resulted in a ttl that was not intended.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/1699
|
||||
|
||||
* Change - Update ownCloud Web to v2.0.1: [#1683](https://github.com/owncloud/ocis/pull/1683)
|
||||
|
||||
Tags: web
|
||||
@@ -33,6 +42,14 @@ The following sections list the changes for unreleased.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/1670
|
||||
https://github.com/asim/go-micro/pull/2126
|
||||
|
||||
* Enhancement - Add initial nats and kubernetes registry support: [#1697](https://github.com/owncloud/ocis/pull/1697)
|
||||
|
||||
We added initial support to use nats and kubernetes as a service registry using
|
||||
`MICRO_REGISTRY=nats` and `MICRO_REGISTRY=kubernetes` respectively. Multiple nodes can
|
||||
be given with `MICRO_REGISTRY_ADDRESS=1.2.3.4,5.6.7.8,9.10.11.12`.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/1697
|
||||
# Changelog for [1.2.0] (2021-02-17)
|
||||
|
||||
The following sections list the changes for 1.2.0.
|
||||
|
||||
@@ -19,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command {
|
||||
Usage: "Print the versions of the running instances",
|
||||
Flags: flagset.ListAccountsWithConfig(cfg),
|
||||
Action: func(c *cli.Context) error {
|
||||
reg := *registry.GetRegistry()
|
||||
reg := registry.GetRegistry()
|
||||
services, err := reg.GetService(cfg.GRPC.Namespace + "." + cfg.Server.Name)
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Errorf("could not get accounts services from the registry: %v", err))
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
Bugfix: Fix the ttl of the authentication middleware cache
|
||||
|
||||
The authentication cache ttl was multiplied with `time.Second` multiple times. This resulted in a ttl that was not intended.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/1699
|
||||
@@ -0,0 +1,6 @@
|
||||
Enhancement: Add initial nats and kubernetes registry support
|
||||
|
||||
We added initial support to use nats and kubernetes as a service registry using `MICRO_REGISTRY=nats` and `MICRO_REGISTRY=kubernetes` respectively.
|
||||
Multiple nodes can be given with `MICRO_REGISTRY_ADDRESS=1.2.3.4,5.6.7.8,9.10.11.12`.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/1697
|
||||
@@ -58,7 +58,7 @@ services:
|
||||
WEB_OIDC_CLIENT_ID: ${OCIS_OIDC_CLIENT_ID:-web}
|
||||
WEB_OIDC_METADATA_URL: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/auth/realms/${KEYCLOAK_REALM:-oCIS}/.well-known/openid-configuration
|
||||
STORAGE_OIDC_ISSUER: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}
|
||||
STORAGE_LDAP_IDP: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}
|
||||
STORAGE_LDAP_IDP: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/auth/realms/${KEYCLOAK_REALM:-oCIS}
|
||||
# general config
|
||||
OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}
|
||||
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose
|
||||
|
||||
@@ -275,7 +275,7 @@ func attribute(name string, values ...string) *ldap.EntryAttribute {
|
||||
}
|
||||
|
||||
func (h ocisHandler) mapAccounts(accounts []*accounts.Account) []*ldap.Entry {
|
||||
var entries []*ldap.Entry
|
||||
entries := make([]*ldap.Entry, 0, len(accounts))
|
||||
for i := range accounts {
|
||||
attrs := []*ldap.EntryAttribute{
|
||||
attribute("objectClass", "posixAccount", "inetOrgPerson", "organizationalPerson", "Person", "top"),
|
||||
@@ -314,7 +314,7 @@ func (h ocisHandler) mapAccounts(accounts []*accounts.Account) []*ldap.Entry {
|
||||
}
|
||||
|
||||
func (h ocisHandler) mapGroups(groups []*accounts.Group) []*ldap.Entry {
|
||||
var entries []*ldap.Entry
|
||||
entries := make([]*ldap.Entry, 0, len(groups))
|
||||
for i := range groups {
|
||||
attrs := []*ldap.EntryAttribute{
|
||||
attribute("objectClass", "posixGroup", "groupOfNames", "top"),
|
||||
|
||||
@@ -53,7 +53,7 @@ func (g Graph) GetGroups(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
var groups []*msgraph.Group
|
||||
groups := make([]*msgraph.Group, 0, len(result.Entries))
|
||||
|
||||
for _, group := range result.Entries {
|
||||
groups = append(
|
||||
|
||||
@@ -76,7 +76,7 @@ func (g Graph) GetUsers(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
var users []*msgraph.User
|
||||
users := make([]*msgraph.User, 0, len(result.Entries))
|
||||
|
||||
for _, user := range result.Entries {
|
||||
users = append(
|
||||
|
||||
@@ -19,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command {
|
||||
Usage: "Print the versions of the running instances",
|
||||
Flags: flagset.ListIDPWithConfig(cfg),
|
||||
Action: func(c *cli.Context) error {
|
||||
reg := *registry.GetRegistry()
|
||||
reg := registry.GetRegistry()
|
||||
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Errorf("could not get idp services from the registry: %v", err))
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
|
||||
// StringToSliceString splits a string into a slice string according to separator
|
||||
func StringToSliceString(src string, sep string) []string {
|
||||
var parts []string
|
||||
parsed := strings.Split(src, sep)
|
||||
parts := make([]string, 0, len(parsed))
|
||||
for _, v := range parsed {
|
||||
parts = append(parts, strings.TrimSpace(v))
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ func TestStringToSliceString(t *testing.T) {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
s := StringToSliceString(tt.input, tt.separator)
|
||||
for i, v := range tt.out {
|
||||
if tt.out[i] != v {
|
||||
if s[i] != v {
|
||||
t.Errorf("got %q, want %q", s, tt.out)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ func (idx *NonUnique) Lookup(v string) ([]string, error) {
|
||||
return []string{}, err
|
||||
}
|
||||
|
||||
var ids []string = nil
|
||||
ids := make([]string, 0, len(fi))
|
||||
for _, f := range fi {
|
||||
ids = append(ids, f.Name())
|
||||
}
|
||||
|
||||
@@ -5,7 +5,9 @@ import (
|
||||
"strings"
|
||||
|
||||
etcdr "github.com/asim/go-micro/plugins/registry/etcd/v3"
|
||||
kubernetesr "github.com/asim/go-micro/plugins/registry/kubernetes/v3"
|
||||
mdnsr "github.com/asim/go-micro/plugins/registry/mdns/v3"
|
||||
natsr "github.com/asim/go-micro/plugins/registry/nats/v3"
|
||||
|
||||
"github.com/asim/go-micro/v3/registry"
|
||||
)
|
||||
@@ -18,11 +20,19 @@ var (
|
||||
// GetRegistry returns a configured micro registry based on Micro env vars.
|
||||
// It defaults to mDNS, so mind that systems with mDNS disabled by default (i.e SUSE) will have a hard time
|
||||
// and it needs to explicitly use etcd. Os awareness for providing a working registry out of the box should be done.
|
||||
func GetRegistry() *registry.Registry {
|
||||
func GetRegistry() registry.Registry {
|
||||
addresses := strings.Split(os.Getenv(registryAddressEnv), ",")
|
||||
|
||||
var r registry.Registry
|
||||
switch os.Getenv(registryEnv) {
|
||||
case "nats":
|
||||
r = natsr.NewRegistry(
|
||||
registry.Addrs(addresses...),
|
||||
)
|
||||
case "kubernetes":
|
||||
r = kubernetesr.NewRegistry(
|
||||
registry.Addrs(addresses...),
|
||||
)
|
||||
case "etcd":
|
||||
r = etcdr.NewRegistry(
|
||||
registry.Addrs(addresses...),
|
||||
@@ -31,5 +41,5 @@ func GetRegistry() *registry.Registry {
|
||||
r = mdnsr.NewRegistry()
|
||||
}
|
||||
|
||||
return &r
|
||||
return r
|
||||
}
|
||||
@@ -39,7 +39,7 @@ func NewService(opts ...Option) Service {
|
||||
micro.Version(sopts.Version),
|
||||
micro.Context(sopts.Context),
|
||||
micro.Flags(sopts.Flags...),
|
||||
micro.Registry(*registry.GetRegistry()),
|
||||
micro.Registry(registry.GetRegistry()),
|
||||
micro.RegisterTTL(time.Second * 30),
|
||||
micro.RegisterInterval(time.Second * 10),
|
||||
micro.WrapHandler(prometheus.NewHandlerWrapper()),
|
||||
|
||||
@@ -32,7 +32,7 @@ func NewService(opts ...Option) Service {
|
||||
micro.Version(sopts.Version),
|
||||
micro.Context(sopts.Context),
|
||||
micro.Flags(sopts.Flags...),
|
||||
micro.Registry(*registry.GetRegistry()),
|
||||
micro.Registry(registry.GetRegistry()),
|
||||
micro.RegisterTTL(time.Second * 30),
|
||||
micro.RegisterInterval(time.Second * 10),
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ func Execute() error {
|
||||
)
|
||||
}
|
||||
|
||||
//r := *registry.GetRegistry()
|
||||
//r := registry.GetRegistry()
|
||||
|
||||
//opts := micro.Options{
|
||||
// Registry: r,
|
||||
|
||||
@@ -19,7 +19,7 @@ func VersionCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: "Lists running services with version",
|
||||
Category: "Runtime",
|
||||
Action: func(c *cli.Context) error {
|
||||
reg := *registry.GetRegistry()
|
||||
reg := registry.GetRegistry()
|
||||
serviceList, err := reg.ListServices()
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Errorf("could not list services: %v", err))
|
||||
|
||||
@@ -19,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command {
|
||||
Usage: "Print the versions of the running instances",
|
||||
Flags: flagset.ListOcsWithConfig(cfg),
|
||||
Action: func(c *cli.Context) error {
|
||||
reg := *registry.GetRegistry()
|
||||
reg := registry.GetRegistry()
|
||||
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Errorf("could not get ocs services from the registry: %v", err))
|
||||
|
||||
@@ -19,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command {
|
||||
Usage: "Print the versions of the running instances",
|
||||
Flags: flagset.ListProxyWithConfig(cfg),
|
||||
Action: func(c *cli.Context) error {
|
||||
reg := *registry.GetRegistry()
|
||||
reg := registry.GetRegistry()
|
||||
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Errorf("could not get proxy services from the registry: %v", err))
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -114,7 +113,7 @@ func newOIDCAuth(options Options) func(http.Handler) http.Handler {
|
||||
HTTPClient(options.HTTPClient),
|
||||
OIDCIss(options.OIDCIss),
|
||||
TokenCacheSize(options.UserinfoCacheSize),
|
||||
TokenCacheTTL(time.Second*time.Duration(options.UserinfoCacheTTL)),
|
||||
TokenCacheTTL(options.UserinfoCacheTTL),
|
||||
CredentialsByUserAgent(options.CredentialsByUserAgent),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
"rollup-plugin-node-globals": "^1.4.0",
|
||||
"rollup-plugin-node-resolve": "^5.2.0",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"rollup-plugin-vue": "^6.0.0",
|
||||
"rollup-plugin-vue": "^5.1.9",
|
||||
"swagger-vue-generator": "^1.0.6",
|
||||
"url-search-params-polyfill": "^8.1.0",
|
||||
"vue-template-compiler": "^2.6.11",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by fileb0x at "2021-02-17 23:32:41.810062204 +0100 CET m=+0.005502483" from config file "embed.yml" DO NOT EDIT.
|
||||
// modification hash(aa8ca655fd0daba998ed4d596fa6427e.8058aec596c5fb73022d09bb97af796e)
|
||||
// Code generated by fileb0x at "2021-02-22 16:30:52.306903647 +0100 CET m=+0.006507857" from config file "embed.yml" DO NOT EDIT.
|
||||
// modification hash(c901ef23d5f6e4f22b06bbff097106b3.8058aec596c5fb73022d09bb97af796e)
|
||||
|
||||
package assets
|
||||
|
||||
@@ -36,7 +36,7 @@ type HTTPFS struct {
|
||||
}
|
||||
|
||||
// FileSettingsJs is "settings.js"
|
||||
var FileSettingsJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\xfb\x7a\xdb\x36\xb6\x38\xfa\xf7\xd9\x4f\x21\x61\x3c\xdc\x40\x05\xd3\x52\xd2\x76\x5a\x2a\x88\x26\x71\x9c\x34\x6d\x62\xa7\xb9\xf5\xa2\x68\x3c\x34\x05\xd9\x88\x25\x40\x05\x21\x5f\x2a\xf1\xbc\xcf\x79\x8d\xf3\x64\xe7\xc3\x8d\x04\x29\xca\xc9\xdc\xf6\xec\xbd\xcf\xef\xfb\xf2\x39\x22\xee\x58\x58\x58\x37\x2c\x2c\x4c\xe9\x8c\x71\x0a\xc7\xe0\x6a\x45\xc1\x04\xc3\xd9\x8a\x67\x8a\x09\x0e\x29\x5a\x83\x55\x4e\x3b\xb9\x92\x2c\x53\x60\x78\x95\xca\x8e\x22\x60\xc5\x6d\x8d\x29\xe8\x12\x75\xbb\xa4\x62\xd6\x39\x9f\x8b\xb3\x74\xfe\xf6\x82\xe5\xa3\xea\x67\xd2\x56\xf2\x9a\xf1\xa9\xb8\x1e\xd9\xff\x5a\x4b\xd8\x06\x5c\x3b\xad\x25\x72\x3a\x9f\x8d\xf4\x9f\x64\x5d\x0c\xfd\x68\x3b\x66\xbc\x76\x88\x6b\x7a\xb3\x14\x52\xe5\xc9\xba\x28\x86\x92\xaa\x95\xe4\x1d\x0a\x15\x56\xb1\xcb\x40\xd5\xcf\x82\xc3\xda\x8c\x6d\x0b\x5b\x29\x98\x93\x93\xb3\x8f\x34\x53\xf1\x52\x0a\x25\xf4\x48\xb0\x24\x3c\xbe\x48\xf3\x93\x6b\xfe\x4a\x8a\x25\x95\xea\x16\x0b\x02\x7c\x55\x40\xfc\x78\xdf\xdc\x2e\xce\xc4\x7c\x64\xff\x4b\xd6\x05\x66\x44\xc4\x4c\x51\x99\x2a\x21\x37\x1b\xf0\xe7\x3f\xfb\x0f\x80\x53\x22\xe2\x34\xbf\xe5\xd9\xf3\x30\xbf\x96\x02\xf0\x8a\x88\x58\x89\x37\x4a\x32\x7e\xfe\x36\x3d\x37\x45\x82\x6f\x50\x01\x25\x87\x14\x2b\xcc\xd1\xda\x41\xc1\xcd\xc1\x82\xd4\x8f\xda\x94\x59\x5f\xa5\xf3\x15\x4d\x38\xa6\x7c\xb5\xa0\x32\x3d\x9b\xd3\xa4\xdb\xc7\x99\xe0\x33\x76\xbe\x2a\xbf\xaf\x25\x53\xee\x77\x81\x30\x1d\xab\x49\xa1\xe4\xed\x3a\x87\xeb\x02\x03\x80\x8a\x2c\x55\xd9\x85\x86\x5a\x1e\xc0\xb0\x36\x04\x5d\x87\xf0\xa2\x28\xc7\x98\xd9\x02\x58\x5a\x50\x0b\xa2\xa2\x28\x00\x73\x87\xf1\x5c\xa5\x3c\xd3\x90\xbc\x1d\xa9\xe4\x16\x33\xbf\x14\x99\xa4\xa9\xa2\x50\x54\x85\x11\x4e\x09\xa7\xd7\x9d\x4b\x28\x37\x9b\xf1\x04\xf9\xd5\x67\xf1\x29\xe3\x57\xe2\x92\x6e\x8d\x4a\x77\x29\xc9\xcc\x17\x2c\xb3\x05\x66\x68\xcd\x66\x50\x12\x42\xa6\x48\x5d\x48\x71\xdd\xd1\x2d\x1f\x49\x29\x24\x04\xcf\x28\xb7\xab\xd1\x61\x79\x27\x9d\x4b\x9a\x4e\x6f\x3b\x72\xc5\x39\xe3\xe7\x00\x0d\x5d\xc5\x0b\xd3\x04\x30\xb5\x01\x21\x44\xb8\x86\x98\xef\xee\x18\xa2\x62\x26\x24\xe4\xf1\x82\xaa\x0b\x31\x25\x02\xf3\x38\x95\xe7\x84\x0d\x87\x76\x6c\x29\xe1\xf1\x94\xce\xe9\x79\xaa\xa8\x6e\x36\xb5\xc9\x2b\x72\x04\x53\xcc\x4d\x4f\x2b\xd3\xcb\x8a\x10\x72\x85\x32\xc1\x15\xe3\x2b\xea\x3b\x58\x15\x85\x1e\x01\xa7\x37\x4a\x0f\xc0\xf7\x83\x78\x9c\x53\xae\x08\x8f\x4f\xdd\xff\xa9\x3c\x1f\xd2\x79\x4e\x3b\xb5\x01\x97\xe5\x3d\x28\x66\x6e\x06\x92\x5c\xd8\x91\x0e\x79\x3c\x65\xf9\x52\x2f\xfb\xd1\x4d\x46\x97\x06\x78\x26\x07\x15\xba\x3d\x60\x07\x12\x36\x16\x45\x3c\x4e\xcf\xe4\x6a\xa9\xa0\xcf\xb5\x6d\xa1\xa1\x24\x53\x43\x66\x72\x32\x77\x0b\x34\x34\xc3\x17\x72\x91\xce\x75\x1b\x79\x6c\x96\xd9\x0e\x87\xc7\x53\xc1\xe9\xe8\x22\x59\xe2\xdc\x40\xad\x05\x02\x0e\xaf\x4d\x3e\xd6\xc5\x13\x5b\xab\x28\xaa\x59\xda\x46\xa3\x08\xda\x59\xb9\xa5\x70\xf9\x6e\x41\x72\x3b\xa5\xa2\x80\x14\x73\x9c\x22\xcc\x2a\x0c\xf6\x63\x5d\xeb\xad\xe0\xba\xd5\x2d\x26\x7e\xe0\x38\x95\xe7\x09\x8d\xb3\x74\x3e\x87\xba\x60\x51\xed\x93\x5a\x71\xd7\xa3\x29\x5d\x14\x05\x8d\xaf\x65\xba\x24\x99\x01\xc9\x8c\x80\x7c\x95\x2f\x29\x9f\xd2\xe9\x1b\x95\x4a\x05\xf0\x32\x48\xfa\x85\xd1\xf9\x14\xe0\x29\x01\xf4\x86\x66\x2b\xa5\xf1\x10\x5f\x10\x90\x89\xc5\x72\x4e\x15\x9d\x02\x7c\x45\x42\x7a\x79\x0b\xd1\xba\x9a\xc2\x79\xed\x6b\xa1\xbf\x74\xa7\x67\xba\xca\xd9\x98\x4d\xaa\x7d\x53\x6e\x64\x75\xc1\xf2\xc2\x0c\xed\xda\x6f\xc8\x73\xaa\x5e\xf9\xad\x78\x32\xc3\xa7\xe4\x3a\x8a\xae\xe1\x35\x3c\x84\xe3\x09\x42\x68\x78\x1a\x45\xa7\x5d\x42\x78\x14\x49\x0b\x8c\x53\xcc\x50\x14\xc1\x33\x72\x8a\x4c\x4b\x27\x64\x51\x6d\x66\x72\x1b\xfc\xae\x6f\xf9\x33\x54\x4d\xe4\xa3\x06\xe3\xd8\xa2\x38\xf6\x20\xf4\x88\x35\x89\x67\x42\x1e\xa5\xd9\x45\x40\xe5\x15\x5a\x5b\xba\x58\x23\xfc\xc1\xac\x3c\xb1\x80\x0a\x53\x54\x20\xf3\xaf\xec\xee\x46\x57\x45\xeb\x80\xef\x08\xcc\x70\x8a\x57\x76\x63\x1a\xcc\x1d\x8b\x09\xa6\x98\x59\xe4\xb5\x23\xea\x56\xb8\xab\x8b\x65\x16\xa1\xf0\x8c\x64\xb1\xc1\xd0\x92\x00\x45\x11\x10\x66\xae\x15\x03\x99\x95\xf0\x9a\x61\x70\x7a\x9a\x5e\xa7\x4c\x01\x34\x52\xb1\xa4\xb9\x98\x5f\x51\x38\x8b\x5d\x2a\x8a\xd5\x05\x6d\x70\x34\xee\xb6\x3f\xa6\x66\x94\x05\xc2\xcd\x6c\x07\x33\x9f\x8f\x92\xa0\xe5\xb6\x16\xdd\x90\x09\xc5\x29\xcc\xb6\x1a\x74\x13\x69\x69\xb7\x58\x41\xb7\x8d\x0c\xa1\x1f\x86\xb0\x0e\x09\xb3\x0c\xc0\xcb\x2a\x84\xd3\xe4\x57\x85\xeb\x88\x85\x1e\x3e\xc5\x12\xeb\x9f\xba\x03\x57\x52\x10\x31\x12\x76\xe0\x0c\x33\x94\x30\x88\x02\x86\x73\xa4\xb7\xb0\xa7\xfc\xb4\xe4\xc4\x63\xbf\xf3\x27\x9e\x7c\x2b\x43\x67\x2a\xfa\x4b\xf8\x6a\x3e\xc7\x3b\xa8\x63\xd5\x50\x6c\x47\x11\x45\x15\x59\xaf\xd3\x39\xa2\xb0\x1d\x43\x5b\x5b\xc8\xcd\xe1\x6a\xb8\x83\x12\x69\x30\xbc\xbd\x5d\x52\xc7\x89\xde\x5e\xd0\x8e\xef\xb9\x33\x15\x34\xef\x70\xa1\x3a\x4b\x29\xae\xd8\x94\x76\xd2\xce\x7f\x9a\xca\xff\xd9\xb1\x6d\x81\x12\x46\x57\x76\x11\xc8\x1c\x4a\x5c\x8d\xdd\x13\xe2\x3a\xdb\xb2\x88\xeb\x97\xa1\x7d\x58\xc2\xe0\x73\x13\x58\x57\x66\x5b\x33\x9b\x5b\x72\xe3\x11\xb3\x94\x1b\xf2\x31\xd5\xa8\xb6\x9a\xab\xe3\x74\x41\x27\x84\x59\xcc\xc2\x3c\xd6\x28\x4b\xa8\xf9\xef\x85\xc8\xca\xfd\xdc\x0d\xd9\x48\x00\x5f\x8b\xLine truncated
|
||||
var FileSettingsJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\xe9\x7a\xdb\x38\xb6\x28\xfa\xfb\x9e\xa7\x90\xb0\xd3\xdc\x40\x09\xa6\xa5\xa4\x46\x2a\x88\x3a\x71\x9c\x54\xaa\x12\x3b\x6d\x27\xa9\x54\x29\x6a\x37\x4d\x41\x36\x63\x09\x50\x81\x90\x87\x92\x78\xdf\xe7\xbe\xc6\x7d\xb2\xfb\x61\x24\x48\x51\x49\x7a\x3a\x7b\x9f\x73\x4f\x7f\xd5\xb1\x88\x19\x0b\x0b\x6b\xc2\xc2\xc2\x94\xce\x72\x46\x21\x9c\xad\x58\x26\x73\xce\x20\x5a\x83\x55\x41\x3b\x85\x14\x79\x26\xc1\xf0\x3a\x15\x1d\x49\xc0\x8a\x99\x82\x53\xd0\x25\xf2\x6e\x49\xf9\xac\x73\x31\xe7\xe7\xe9\xfc\xcd\x65\x5e\x8c\xaa\x9f\x49\x5b\xc9\x9b\x9c\x4d\xf9\xcd\xc8\xfc\x69\x2d\x61\x1a\xb0\xed\xb4\x96\x28\xe8\x7c\x36\x52\xff\x24\xeb\x72\xe8\x06\xdb\xa1\x50\xa2\xb5\x1a\x22\x25\x6b\x7a\xbb\xe4\x42\x16\xc9\xba\x2c\x87\x82\xca\x95\x60\x1d\x09\x29\xa6\xb1\xcd\x40\xd5\xcf\x32\x9c\xb0\x6f\x61\x2b\x05\x33\x72\x7c\xfe\x91\x66\x32\x5e\x0a\x2e\xb9\x1a\x09\x16\x84\xc5\x97\x69\x71\x7c\xc3\x5e\x0b\xbe\xa4\x42\xde\x61\x4e\x80\xab\x0a\x88\x1b\xef\xe9\xdd\xe2\x9c\xcf\x47\xe6\x4f\xb2\x2e\x71\x4e\x78\x9c\x4b\x2a\x52\xc9\xc5\x66\x03\xfe\xfc\x67\xf7\x01\x70\x4a\x78\x9c\x16\x77\x2c\x7b\x11\xe6\xd7\x52\x00\x2e\x08\x8f\x25\x3f\x95\x22\x67\x17\x6f\xd2\x0b\x5d\x24\xf8\x06\x15\x50\x56\x50\x62\x8a\x19\x5a\x5b\x28\xd8\x39\x18\x90\xba\x51\xeb\x32\xeb\xeb\x74\xbe\xa2\x09\xc3\x94\xad\x16\x54\xa4\xe7\x73\x9a\x74\xfb\x38\xe3\x6c\x96\x5f\xac\xfc\xf7\x8d\xc8\xa5\xfd\x5d\x22\x2c\xc7\x74\x52\x4a\x71\xb7\x5e\xc1\x75\x89\x01\x40\x65\x96\xca\xec\x52\x41\x6d\x15\xc0\xb0\x36\x04\x55\x87\xb0\xb2\xf4\x63\xcc\x4c\x01\x2c\x0c\xa8\x39\xa1\x51\x44\x2b\x30\x77\x72\x56\xc8\x94\x65\x0a\x92\x77\x23\x9a\xdc\xe1\xdc\x2d\x45\x26\x68\x2a\x29\xe4\x55\x61\x84\x53\xc2\xe8\x4d\xe7\x1d\x14\x9b\xcd\x78\x82\xdc\xea\xe7\xf1\x59\xce\xae\xf9\x15\xdd\x1a\x95\xea\x52\x90\x99\x2b\xe8\xb3\x39\xce\xd1\x3a\x9f\x41\x41\x08\x99\x22\x79\x29\xf8\x4d\x47\xb5\x7c\x28\x04\x17\x10\x3c\xa7\xcc\xac\x46\x27\x2f\x3a\xe9\x5c\xd0\x74\x7a\xd7\x11\x2b\xc6\x72\x76\x01\xd0\xd0\x56\xbc\xd4\x4d\x00\x5d\x1b\x10\x42\xb8\x6d\x28\x77\xdd\x3d\x86\xa8\x9c\x71\x01\x59\xbc\xa0\xf2\x92\x4f\x09\xc7\x2c\x4e\xc5\x05\xc9\x87\x43\x33\xb6\x94\xb0\x78\x4a\xe7\xf4\x22\x95\x54\x35\x9b\x9a\xe4\x82\xdc\xc2\x14\x33\xdd\x53\xa1\x7b\x29\x08\x21\xd7\x28\xe3\x4c\xe6\x6c\x45\x5d\x07\x45\x59\xaa\x11\x30\x7a\x2b\xd5\x00\x5c\x3f\x88\xc5\x05\x65\x92\xb0\xf8\xcc\xfe\x4d\xc5\xc5\x90\xce\x0b\xda\xa9\x0d\xd8\x97\x77\xa0\x98\xd9\x19\x08\x72\x69\x46\x3a\x64\xf1\x34\x2f\x96\x6a\xd9\x0f\x6f\x33\xba\xd4\xc0\xd3\x39\xa8\x54\xed\x01\x33\x90\xb0\xb1\x28\x62\x71\x7a\x2e\x56\x4b\x09\x5d\xae\x69\x0b\x0d\x05\x99\x6a\x32\xb3\x22\x73\xbb\x40\x43\x3d\x7c\x2e\x16\xe9\x5c\xb5\xb1\x8a\xf5\x32\x9b\xe1\xb0\x78\xca\x19\x1d\x5d\x26\x4b\xbc\xd2\x50\x6b\x81\x80\xc5\x6b\x9d\x8f\x55\xf1\xc4\xd4\x2a\xcb\x6a\x96\xa6\xd1\x28\x82\x66\x56\x76\x29\x6c\xbe\x5d\x90\x95\x99\x52\x59\x42\x89\x19\x4e\x11\xce\x2b\x0c\x76\x63\x5d\xab\xad\x60\xbb\x55\x2d\x26\x6e\xe0\x38\x15\x17\x89\x8c\xb3\x74\x3e\x87\xaa\x60\x59\xed\x93\x5a\x71\xdb\xa3\x2e\x5d\x96\xa5\x8c\x6f\x44\xba\x24\x99\x06\xc9\x8c\x80\x62\x55\x2c\x29\x9b\xd2\xe9\xa9\x4c\x85\x04\x78\x19\x24\xfd\x9a\xd3\xf9\x14\xe0\x29\x01\xf4\x96\x66\x2b\xa9\xf0\x10\x5f\x12\x90\xf1\xc5\x72\x4e\x25\x9d\x02\x7c\x4d\x42\x7a\x79\x07\xd1\xba\x9a\xc2\x45\xed\x6b\xa1\xbe\x54\xa7\xe7\xaa\xca\xf9\x38\x9f\x90\x80\x29\xb8\x8d\x7c\x99\x17\xa5\x1e\xda\x99\xdb\x90\x17\x54\xbe\x76\x5b\xf1\x78\x86\x6f\xc8\x59\x14\x9d\xc1\x33\x78\x05\xc7\x13\x84\xd0\xf0\x26\x8a\x6e\xba\x84\xb0\x28\x12\x06\x18\x37\x38\x47\x51\x04\xcf\xc9\x0d\xd2\x2d\x1d\x93\x45\xb5\x99\xc9\x5d\xf0\xbb\xbe\xe5\xcf\x51\x35\x91\x8f\x0a\x8c\x63\x83\xe2\xd8\x81\xd0\x21\xd6\x24\x9e\x71\x71\x98\x66\x97\x01\x95\xa7\x68\x6d\xe8\x62\x8d\xf0\x07\xb3\x72\xc4\x02\x52\x2c\x51\x89\xf4\x7f\xbe\xbb\x43\x55\x15\xad\xfd\xb7\x26\x15\x38\xc5\x85\xd9\x98\x1a\x73\xc7\x7c\x82\x25\xce\x0d\xf2\x9a\x11\x75\x2b\xdc\x55\xc5\x32\x83\x50\x78\x46\xb2\x58\x63\xa8\x27\x40\x51\x04\xb8\x9e\x6b\xc5\x40\x66\x1e\x5e\x33\x0c\xce\xce\xd2\x9b\x34\x97\x00\x8d\x68\x2c\x68\xc1\xe7\xd7\x14\xce\x62\x9b\x8a\x62\x79\x49\x59\x9d\xa3\x31\xbb\xfd\xb1\xd4\xa3\x2c\x11\x6e\x66\x5b\x98\xb9\x7c\x94\x04\x2d\xb7\xb5\x68\x87\x4c\x24\x4e\x61\xb6\xd5\xa0\x9d\x48\x4b\xbb\x65\x01\xed\x36\xd2\x84\x7e\x18\xc2\x3a\x24\xcc\x22\x00\x6f\x5e\x21\x9c\x22\xbf\x21\xb7\xa6\x98\xab\xe1\x4b\x2c\xb0\xfa\xa9\x3a\xb0\x25\x39\xe1\x23\x6e\x06\x9e\xe3\x1c\x25\x39\x44\x01\xc3\xb9\x55\x5b\xd8\x51\x7e\xe9\x39\xf1\xd8\xed\xfc\x89\x23\xdf\x86\xce\x54\xf4\x97\xb0\xd5\x7c\x8e\x77\x50\xc7\xaa\xa1\xd8\x8c\x22\x8a\x2a\xb2\x5e\xa7\x73\x84\x62\x33\x86\xb6\xb6\x90\x9d\xc3\xf5\x70\x07\x25\x52\x60\x78\x73\xb7\xa4\x96\x13\xbd\xb9\xa4\x1d\xd7\x73\x67\xca\x69\xd1\x61\x5c\x76\x96\x82\x5f\xe7\x53\xda\x49\x3b\xff\xa9\x2b\xff\x67\xc7\xb4\x05\x3c\x8c\xae\xcd\x22\x90\x39\x14\xb8\x1a\xbb\x23\xc4\x75\xb6\x65\x10\xd7\x2d\x43\xfb\xb0\xb8\xc6\xe7\x26\xb0\xae\xf5\xb6\xce\x4d\xae\xe7\xc6\xa3\xdc\x50\x6e\xc8\xc6\x52\xa1\xda\x6a\x2e\x8f\xd2\x05\x9d\x90\xdc\x60\x16\x66\xb1\x42\x59\x22\xf5\x9f\x97\x3c\xf3\xfb\xb9\x1b\xb2\x91\x00\xbe\x06\xc3\x2d\x74\xLine truncated
|
||||
|
||||
func init() {
|
||||
err := CTX.Err()
|
||||
|
||||
@@ -19,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command {
|
||||
Usage: "Print the versions of the running instances",
|
||||
Flags: flagset.ListSettingsWithConfig(cfg),
|
||||
Action: func(c *cli.Context) error {
|
||||
reg := *registry.GetRegistry()
|
||||
reg := registry.GetRegistry()
|
||||
services, err := reg.GetService(cfg.GRPC.Namespace + "." + cfg.Service.Name)
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Errorf("could not get settings services from the registry: %v", err))
|
||||
|
||||
@@ -450,17 +450,17 @@ func TestSaveGetIntValue(t *testing.T) {
|
||||
{
|
||||
name: "negative",
|
||||
value: proto.Value_IntValue{IntValue: -42},
|
||||
// https://github.com/owncloud/ocis/settings/issues/57
|
||||
// no validation for SaveValue https://github.com/owncloud/ocis/issues/1445
|
||||
},
|
||||
{
|
||||
name: "less than Min",
|
||||
value: proto.Value_IntValue{IntValue: 0},
|
||||
// https://github.com/owncloud/ocis/settings/issues/57
|
||||
// no validation for SaveValue https://github.com/owncloud/ocis/issues/1445
|
||||
},
|
||||
{
|
||||
name: "more than Max",
|
||||
value: proto.Value_IntValue{IntValue: 128},
|
||||
// https://github.com/owncloud/ocis/settings/issues/57
|
||||
// no validation for SaveValue https://github.com/owncloud/ocis/issues/1445
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
@@ -502,7 +502,7 @@ func TestSaveGetIntValue(t *testing.T) {
|
||||
|
||||
/**
|
||||
try to save a wrong type of the value
|
||||
https://github.com/owncloud/ocis/settings/issues/57
|
||||
no validation for SaveValue https://github.com/owncloud/ocis/issues/1445
|
||||
*/
|
||||
func TestSaveGetIntValueIntoString(t *testing.T) {
|
||||
teardown := setup()
|
||||
@@ -538,7 +538,7 @@ func TestSaveGetIntValueIntoString(t *testing.T) {
|
||||
assert.Equal(t, "forty two", getValueResponse.Value.Value.GetStringValue())
|
||||
}
|
||||
|
||||
// https://github.com/owncloud/ocis/settings/issues/18
|
||||
// no plausibility check in settings of bundle https://github.com/owncloud/ocis/issues/1455
|
||||
func TestSaveBundleWithInvalidSettings(t *testing.T) {
|
||||
var tests = []proto.Setting{
|
||||
{
|
||||
@@ -747,7 +747,6 @@ func TestSaveBundleWithInvalidSettings(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/owncloud/ocis/settings/issues/19
|
||||
func TestGetBundleNoSideEffectsOnDisk(t *testing.T) {
|
||||
teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
+730
-33
File diff suppressed because it is too large.
Load diff
+3
-3
@@ -19,14 +19,14 @@ func RegisterGRPCEndpoint(ctx context.Context, serviceID, uuid, addr string, log
|
||||
Address: addr,
|
||||
Metadata: make(map[string]string),
|
||||
}
|
||||
r := oregistry.GetRegistry()
|
||||
|
||||
node.Metadata["broker"] = broker.String()
|
||||
node.Metadata["registry"] = registry.String()
|
||||
node.Metadata["registry"] = r.String()
|
||||
node.Metadata["server"] = "grpc"
|
||||
node.Metadata["transport"] = "grpc"
|
||||
node.Metadata["protocol"] = "grpc"
|
||||
|
||||
r := *oregistry.GetRegistry()
|
||||
|
||||
service := ®istry.Service{
|
||||
Name: serviceID,
|
||||
Version: "",
|
||||
|
||||
@@ -19,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command {
|
||||
Usage: "Print the versions of the running instances",
|
||||
Flags: flagset.ListStoreWithConfig(cfg),
|
||||
Action: func(c *cli.Context) error {
|
||||
reg := *registry.GetRegistry()
|
||||
reg := registry.GetRegistry()
|
||||
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Errorf("could not get store services from the registry: %v", err))
|
||||
|
||||
@@ -19,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command {
|
||||
Usage: "Print the versions of the running instances",
|
||||
Flags: flagset.ListThumbnailsWithConfig(cfg),
|
||||
Action: func(c *cli.Context) error {
|
||||
reg := *registry.GetRegistry()
|
||||
reg := registry.GetRegistry()
|
||||
services, err := reg.GetService(cfg.Server.Namespace + "." + cfg.Server.Name)
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Errorf("could not get thumbnails services from the registry: %v", err))
|
||||
|
||||
@@ -36,7 +36,7 @@ type Resolutions []image.Rectangle
|
||||
|
||||
// ParseResolutions creates an instance of Resolutions from resolution strings.
|
||||
func ParseResolutions(strs []string) (Resolutions, error) {
|
||||
var rs Resolutions
|
||||
rs := make(Resolutions, 0, len(strs))
|
||||
for _, s := range strs {
|
||||
r, err := ParseResolution(s)
|
||||
if err != nil {
|
||||
|
||||
@@ -19,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command {
|
||||
Usage: "Print the versions of the running instances",
|
||||
Flags: flagset.ListWebdavWithConfig(cfg),
|
||||
Action: func(c *cli.Context) error {
|
||||
reg := *registry.GetRegistry()
|
||||
reg := registry.GetRegistry()
|
||||
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Errorf("could not get webdav services from the registry: %v", err))
|
||||
|
||||
Reference in new issue
Block a user