diff --git a/internal/http/services/owncloud/ocdav/download.go b/internal/http/services/owncloud/ocdav/download.go index 84d0efe7c7..2607c8148f 100644 --- a/internal/http/services/owncloud/ocdav/download.go +++ b/internal/http/services/owncloud/ocdav/download.go @@ -41,7 +41,6 @@ import ( "google.golang.org/grpc/metadata" ) -// index.php/s/jIKrtrkXCIXwg1y/download?path=%2FHugo&files=Intrinsico func (s *svc) handleLegacyPublicLinkDownload(w http.ResponseWriter, r *http.Request) { token := strings.TrimPrefix(r.URL.Path, "/") files := getFilesFromRequest(r) @@ -91,7 +90,7 @@ func (s *svc) authenticate(ctx context.Context, token string) (context.Context, return ctx, nil } -func (s *svc) handleHttpError(w http.ResponseWriter, err error, log *zerolog.Logger) { +func (s *svc) handleHTTPError(w http.ResponseWriter, err error, log *zerolog.Logger) { log.Error().Err(err).Msg("ocdav: got error") switch err.(type) { case errtypes.NotFound: @@ -109,12 +108,12 @@ func (s *svc) downloadFiles(ctx context.Context, w http.ResponseWriter, token st log := appctx.GetLogger(ctx) ctx, err := s.authenticate(ctx, token) if err != nil { - s.handleHttpError(w, err, log) + s.handleHTTPError(w, err, log) return } isSingleFileShare, res, err := s.isSingleFileShare(ctx, token, files) if err != nil { - s.handleHttpError(w, err, log) + s.handleHTTPError(w, err, log) return } if isSingleFileShare { @@ -186,13 +185,13 @@ func (s *svc) downloadFile(ctx context.Context, w http.ResponseWriter, res *prov log := appctx.GetLogger(ctx) c, err := s.getClient() if err != nil { - s.handleHttpError(w, err, log) + s.handleHTTPError(w, err, log) return } d := downloader.NewDownloader(c) r, err := d.Download(ctx, res.Path, "") if err != nil { - s.handleHttpError(w, err, log) + s.handleHTTPError(w, err, log) return } defer r.Close() @@ -201,7 +200,7 @@ func (s *svc) downloadFile(ctx context.Context, w http.ResponseWriter, res *prov _, err = io.Copy(w, r) if err != nil { - s.handleHttpError(w, err, log) + s.handleHTTPError(w, err, log) return } } @@ -223,7 +222,7 @@ func (s *svc) downloadArchive(ctx context.Context, w http.ResponseWriter, token gtw, err := s.getClient() if err != nil { - s.handleHttpError(w, err, log) + s.handleHTTPError(w, err, log) return } @@ -235,12 +234,12 @@ func (s *svc) downloadArchive(ctx context.Context, w http.ResponseWriter, token MaxSize: s.c.PublicLinkDownload.MaxSize, }) if err != nil { - s.handleHttpError(w, err, log) + s.handleHTTPError(w, err, log) return } if err := archiver.CreateTar(ctx, w); err != nil { - s.handleHttpError(w, err, log) + s.handleHTTPError(w, err, log) return } } diff --git a/internal/http/services/owncloud/ocs/conversions/role.go b/internal/http/services/owncloud/ocs/conversions/role.go index ce0083085a..cc2b060410 100644 --- a/internal/http/services/owncloud/ocs/conversions/role.go +++ b/internal/http/services/owncloud/ocs/conversions/role.go @@ -37,7 +37,7 @@ type Role struct { const ( // RoleViewer grants non-editor role on a resource. RoleViewer = "viewer" - // RoleReader grants non-editor role on a resource + // RoleReader grants non-editor role on a resource. RoleReader = "reader" // RoleEditor grants editor permission on a resource, including folders. RoleEditor = "editor" @@ -53,7 +53,7 @@ const ( RoleUnknown = "unknown" // RoleLegacy provides backwards compatibility. RoleLegacy = "legacy" - // RoleDenied grants no permission at all on a resource + // RoleDenied grants no permission at all on a resource. RoleDenied = "denied" ) diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go index adc4359cbb..2933428c26 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go @@ -952,7 +952,7 @@ func (h *Handler) listSharesWithMe(w http.ResponseWriter, r *http.Request) { // can we return the mountpoint when the gateway resolves the listing of shares? // - no, the gateway only sees the same list any has the same options as the ocs service - // - we would need to have a list of mountpoints for the shares -> owncloudstorageprovider for hot migration migration + // - we would need to have a list of mountpoints for the shares -> owncloudstorageprovider for hot migration // best we can do for now is stat the /Shares jail if it is set and return those paths diff --git a/pkg/user/utils.go b/pkg/user/utils.go index a824d09560..dd6d21205b 100644 --- a/pkg/user/utils.go +++ b/pkg/user/utils.go @@ -1,4 +1,4 @@ -// Copyright 2018-2022 CERN +// Copyright 2018-2023 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.