diff --git a/changelog/unreleased/fix-share-update.md b/changelog/unreleased/fix-share-update.md new file mode 100644 index 0000000000..b787190465 --- /dev/null +++ b/changelog/unreleased/fix-share-update.md @@ -0,0 +1,7 @@ +Bugfix: Fix share update + +We fixed the response code when the role/permission is empty on the share update + + +https://github.com/cs3org/reva/pull/4709 +https://github.com/owncloud/ocis/issues/8747 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 ef88c9acb8..b006d5d528 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 @@ -859,6 +859,9 @@ func (h *Handler) updateShare(w http.ResponseWriter, r *http.Request, share *col case rpc.Code_CODE_LOCKED: response.WriteOCSError(w, r, response.MetaLocked.StatusCode, uRes.GetStatus().GetMessage(), nil) return + case rpc.Code_CODE_INVALID_ARGUMENT, rpc.Code_CODE_FAILED_PRECONDITION: + response.WriteOCSError(w, r, response.MetaBadRequest.StatusCode, uRes.GetStatus().GetMessage(), nil) + return } response.WriteOCSError(w, r, response.MetaServerError.StatusCode, "grpc update share request failed", err) return