diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go index b408909c2ac..a462a7cd52c 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go @@ -151,7 +151,7 @@ func (h *Handler) updateReceivedShare(w http.ResponseWriter, r *http.Request, sh return nil } - hideFlag, _ := strconv.ParseBool(r.URL.Query().Get("hide")) + hideFlag, err := strconv.ParseBool(r.URL.Query().Get("hide")) // we need to add a path to the share shareRequest := &collaboration.UpdateReceivedShareRequest{ diff --git a/pkg/share/manager/cs3/cs3.go b/pkg/share/manager/cs3/cs3.go index ed5d665c2e5..f0ac9a13510 100644 --- a/pkg/share/manager/cs3/cs3.go +++ b/pkg/share/manager/cs3/cs3.go @@ -638,6 +638,8 @@ func (m *Manager) UpdateReceivedShare(ctx context.Context, rshare *collaboration rs.State = rshare.State case "mount_point": rs.MountPoint = rshare.MountPoint + case "hide": + continue default: return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported") } diff --git a/pkg/share/manager/json/json.go b/pkg/share/manager/json/json.go index 511ea87a831..31c20c27d5b 100644 --- a/pkg/share/manager/json/json.go +++ b/pkg/share/manager/json/json.go @@ -404,7 +404,7 @@ func (m *mgr) UpdateShare(ctx context.Context, ref *collaboration.ShareReference case "expiration": m.model.Shares[idx].Expiration = updated.Expiration case "hide": - m.model.Shares[idx].Hide = updated.Hide + continue default: return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported") } diff --git a/pkg/share/manager/jsoncs3/jsoncs3.go b/pkg/share/manager/jsoncs3/jsoncs3.go index 8f35cdecba5..61f5ee73346 100644 --- a/pkg/share/manager/jsoncs3/jsoncs3.go +++ b/pkg/share/manager/jsoncs3/jsoncs3.go @@ -993,6 +993,8 @@ func (m *Manager) UpdateReceivedShare(ctx context.Context, receivedShare *collab return nil, err } + log.Error().Interface("receivedShare", receivedShare).Interface("rs", rs).Msg("=================> Shares") + for i := range fieldMask.Paths { switch fieldMask.Paths[i] { case "state": diff --git a/pkg/share/manager/memory/memory.go b/pkg/share/manager/memory/memory.go index 3927613a32e..6d2c3a17911 100644 --- a/pkg/share/manager/memory/memory.go +++ b/pkg/share/manager/memory/memory.go @@ -361,6 +361,8 @@ func (m *manager) UpdateReceivedShare(ctx context.Context, receivedShare *collab rs.State = receivedShare.State case "mount_point": rs.MountPoint = receivedShare.MountPoint + case "hide": + continue default: return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported") } diff --git a/pkg/share/manager/owncloudsql/owncloudsql.go b/pkg/share/manager/owncloudsql/owncloudsql.go index d5f28c4a122..34fe52a5a9b 100644 --- a/pkg/share/manager/owncloudsql/owncloudsql.go +++ b/pkg/share/manager/owncloudsql/owncloudsql.go @@ -447,6 +447,8 @@ func (m *mgr) UpdateReceivedShare(ctx context.Context, receivedShare *collaborat fields = append(fields, "file_target=?") rs.MountPoint = receivedShare.MountPoint params = append(params, rs.MountPoint.Path) + case "hide": + continue default: return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported") }