Skip to content

Commit

Permalink
skip ocm calls if listing ocm is disabled
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Apr 23, 2024
1 parent 1f0602f commit 6562481
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-deleting-shares.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix deleting space shares

We no longer check if a share is an ocm sharee if listng ocm shares has been disabled anyway. This allows unsharing space shares.

https://github.com/cs3org/reva/pull/4651
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ func (h *Handler) GetShare(w http.ResponseWriter, r *http.Request) {
}
}

if share == nil {
if h.listOCMShares && share == nil {
// check if we have a federated share
req := &ocm.GetOCMShareRequest{
Ref: &ocm.ShareReference{
Expand Down Expand Up @@ -661,7 +661,7 @@ func (h *Handler) GetShare(w http.ResponseWriter, r *http.Request) {
}
}

if share == nil {
if h.listOCMShares && share == nil {
// check if we have an incoming federated share
req := &ocm.GetReceivedOCMShareRequest{
Ref: &ocm.ShareReference{
Expand Down Expand Up @@ -908,7 +908,7 @@ func (h *Handler) RemoveShare(w http.ResponseWriter, r *http.Request) {
h.removeUserShare(w, r, share)
return
}
if h.isFederatedShare(r, shareID) {
if h.listOCMShares && h.isFederatedShare(r, shareID) {
h.removeFederatedShare(w, r, shareID)
return
}
Expand Down

0 comments on commit 6562481

Please sign in to comment.