Bump major version to v2

This commit is contained in:
Michael Barz
2022-05-04 14:49:59 +02:00
parent a3c4a9d57d
commit 189987bcbd
708 changed files with 2198 additions and 2183 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ import (
revactx "github.com/cs3org/reva/v2/pkg/ctx"
"github.com/cs3org/reva/v2/pkg/token/manager/jwt"
"github.com/owncloud/ocis/ocis-pkg/account"
"github.com/owncloud/ocis/v2/ocis-pkg/account"
"go-micro.dev/v4/metadata"
)
@@ -64,7 +64,7 @@ func ExtractAccountUUID(opts ...account.Option) func(http.Handler) http.Handler
ctx := revactx.ContextSetUser(r.Context(), u)
// Important: user.Id.OpaqueId is the AccountUUID. Set this way in the account uuid middleware in ocis-proxy.
// https://github.com/owncloud/ocis-proxy/blob/ea254d6036592cf9469d757d1295e0c4309d1e63/pkg/middleware/account_uuid.go#L109
// https://github.com/owncloud/ocis/v2-proxy/blob/ea254d6036592cf9469d757d1295e0c4309d1e63/pkg/middleware/account_uuid.go#L109
// TODO: implement token manager in cs3org/reva that uses generic metadata instead of access token from header.
ctx = metadata.Set(ctx, AccountID, u.Id.OpaqueId)
if u.Opaque != nil {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"strings"
"time"
"github.com/owncloud/ocis/ocis-pkg/cors"
"github.com/owncloud/ocis/v2/ocis-pkg/cors"
chicors "github.com/go-chi/cors"
)
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"time"
"github.com/go-chi/chi/v5/middleware"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
)
// Logger is a middleware to log http requests. It uses debug level logging and should be used by all services save the proxy (which uses info level logging).
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"time"
oidc "github.com/coreos/go-oidc/v3/oidc"
ocisoidc "github.com/owncloud/ocis/ocis-pkg/oidc"
ocisoidc "github.com/owncloud/ocis/v2/ocis-pkg/oidc"
"golang.org/x/oauth2"
)
+2 -2
View File
@@ -20,7 +20,7 @@ func Static(root string, fs http.FileSystem, ttl int) func(http.Handler) http.Ha
),
)
// TODO: investigate broken caching - https://github.com/owncloud/ocis/issues/1094
// TODO: investigate broken caching - https://github.com/owncloud/ocis/v2/issues/1094
// we don't have a last modification date of the static assets, so we use the service start date
//lastModified := time.Now().UTC().Format(http.TimeFormat)
//expires := time.Now().Add(time.Second * time.Duration(ttl)).UTC().Format(http.TimeFormat)
@@ -30,7 +30,7 @@ func Static(root string, fs http.FileSystem, ttl int) func(http.Handler) http.Ha
if strings.HasPrefix(r.URL.Path, path.Join(root, "api")) {
next.ServeHTTP(w, r)
} else {
// TODO: investigate broken caching - https://github.com/owncloud/ocis/issues/1094
// TODO: investigate broken caching - https://github.com/owncloud/ocis/v2/issues/1094
//w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%s, must-revalidate", strconv.Itoa(ttl)))
//w.Header().Set("Expires", expires)
//w.Header().Set("Last-Modified", lastModified)