enhancement: handle share mount errors

This commit is contained in:
Florian Schade
2024-02-28 17:29:04 +01:00
committed by Ralf Haferkamp
parent 5f705c6263
commit cad0d944eb
2 changed files with 51 additions and 43 deletions
+6
View File
@@ -7,6 +7,7 @@ import (
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
storageprovider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/cs3org/reva/v2/pkg/utils"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
@@ -73,3 +74,8 @@ func (g Graph) GetGatewayClient(w http.ResponseWriter, r *http.Request) (gateway
return gatewayClient, true
}
// IsShareJail returns true if the resourceID is a share jail.
func IsShareJail(id storageprovider.ResourceId) bool {
return id.GetStorageId() == utils.ShareStorageProviderID && id.GetSpaceId() == utils.ShareStorageSpaceID
}