bump reva

This commit is contained in:
Saw-jan
2023-07-31 12:56:58 +05:45
parent 3662ff2514
commit 8f7c6e165a
5 changed files with 10 additions and 9 deletions
+1
View File
@@ -3,3 +3,4 @@ Enhancement: Bump reva
bumps reva version
https://github.com/owncloud/ocis/pull/6899
https://github.com/owncloud/ocis/pull/6919
+1 -1
View File
@@ -13,7 +13,7 @@ require (
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/coreos/go-oidc/v3 v3.6.0
github.com/cs3org/go-cs3apis v0.0.0-20230516150832-730ac860c71d
github.com/cs3org/reva/v2 v2.15.1-0.20230731061316-db79e9b61738
github.com/cs3org/reva/v2 v2.15.1-0.20230731062052-2c2e370980e0
github.com/disintegration/imaging v1.6.2
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
github.com/egirna/icap-client v0.1.1
@@ -161,9 +161,9 @@ func (h *Handler) createPublicLinkShare(w http.ResponseWriter, r *http.Request,
}
if !sufficientPermissions(statInfo.PermissionSet, permissions, true) {
response.WriteOCSError(w, r, http.StatusNotFound, "no share permission", nil)
response.WriteOCSError(w, r, http.StatusForbidden, "no share permission", nil)
return nil, &ocsError{
Code: http.StatusNotFound,
Code: http.StatusForbidden,
Message: "Cannot set the requested share permissions",
Error: errors.New("cannot set the requested share permissions"),
}
@@ -417,7 +417,7 @@ func (h *Handler) updatePublicShare(w http.ResponseWriter, r *http.Request, shar
// empty permissions mean internal link here - NOT denial. Hence we need an extra check
if !sufficientPermissions(statRes.Info.PermissionSet, newPermissions, true) {
response.WriteOCSError(w, r, http.StatusNotFound, "no share permission", nil)
response.WriteOCSError(w, r, http.StatusForbidden, "no share permission", nil)
return
}
@@ -232,7 +232,7 @@ func (h *Handler) CreateShare(w http.ResponseWriter, r *http.Request) {
case rpc.Code_CODE_NOT_FOUND:
response.WriteOCSData(w, r, response.MetaPathNotFound, nil, nil)
case rpc.Code_CODE_PERMISSION_DENIED:
response.WriteOCSError(w, r, http.StatusNotFound, "No share permission", nil)
response.WriteOCSError(w, r, http.StatusForbidden, "No share permission", nil)
default:
sublog.Error().Interface("status", statRes.Status).Msg("CreateShare: stat failed")
w.WriteHeader(http.StatusInternalServerError)
@@ -250,7 +250,7 @@ func (h *Handler) CreateShare(w http.ResponseWriter, r *http.Request) {
// check user has share permissions
if !conversions.RoleFromResourcePermissions(statRes.Info.PermissionSet, false).OCSPermissions().Contain(conversions.PermissionShare) {
response.WriteOCSError(w, r, http.StatusNotFound, "No share permission", nil)
response.WriteOCSError(w, r, http.StatusForbidden, "No share permission", nil)
return
}
@@ -298,7 +298,7 @@ func (h *Handler) CreateShare(w http.ResponseWriter, r *http.Request) {
// public links default to read only
_, _, ocsErr := h.extractPermissions(reqRole, reqPermissions, statRes.Info, conversions.NewViewerRole(h.resharing))
if ocsErr != nil && ocsErr.Error != conversions.ErrZeroPermission {
response.WriteOCSError(w, r, http.StatusNotFound, "No share permission", nil)
response.WriteOCSError(w, r, http.StatusForbidden, "No share permission", nil)
return
}
share, ocsErr := h.createPublicLinkShare(w, r, statRes.Info)
@@ -459,7 +459,7 @@ func (h *Handler) extractPermissions(reqRole string, reqPermissions string, ri *
if !sufficientPermissions(ri.PermissionSet, role.CS3ResourcePermissions(), false) && role.Name != conversions.RoleDenied {
return nil, nil, &ocsError{
Code: http.StatusNotFound,
Code: http.StatusForbidden,
Message: "Cannot set the requested share permissions",
Error: errors.New("cannot set the requested share permissions"),
}
+1 -1
View File
@@ -352,7 +352,7 @@ github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1
github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1
github.com/cs3org/go-cs3apis/cs3/tx/v1beta1
github.com/cs3org/go-cs3apis/cs3/types/v1beta1
# github.com/cs3org/reva/v2 v2.15.1-0.20230731061316-db79e9b61738
# github.com/cs3org/reva/v2 v2.15.1-0.20230731062052-2c2e370980e0
## explicit; go 1.20
github.com/cs3org/reva/v2/cmd/revad/internal/grace
github.com/cs3org/reva/v2/cmd/revad/runtime