Repository: owncloud/ocis
Pull request #6545 (2023-06-16 13:42:49)

[docs-only] update the reva changelog


## Description

Fix the reva changelog

## Related Issue
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->
- Fixes <issue_link>

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
- test environment:
- test case 1:
- test case 2:
- ...

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Technical debt
- [ ] Tests only (no source changes)

## Checklist:
<!-- Tick the checkboxes when done. -->
<!-- Raise documentation ticket in owncloud.github.io/ -->
- [ ] Code changes
- [ ] Unit tests added
- [ ] Acceptance tests added
- [ ] Documentation ticket raised: <link> 



Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0db942c929a..06feb6d7e18 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,7 +11,6 @@ The following sections list the changes for unreleased.
 * Enhancement - Add permissions to report: [#6528](https://github.com/owncloud/ocis/pull/6528)
 * Enhancement - Add more metadata to the remote item: [#6300](https://github.com/owncloud/ocis/pull/6300)
 * Enhancement - Make the app provider service name configurable: [#6482](https://github.com/owncloud/ocis/pull/6482)
-* Enhancement - Add old & new values to audit logs: [#6537](https://github.com/owncloud/ocis/pull/6537)
 * Enhancement - Update reva: [#6529](https://github.com/owncloud/ocis/pull/6529)
 * Enhancement - Update reva: [#6507](https://github.com/owncloud/ocis/pull/6507)
 * Enhancement - Use reva client selectors: [#6452](https://github.com/owncloud/ocis/pull/6452)
@@ -64,12 +63,6 @@ The following sections list the changes for unreleased.
 
    https://github.com/owncloud/ocis/pull/6482
 
-* Enhancement - Add old & new values to audit logs: [#6537](https://github.com/owncloud/ocis/pull/6537)
-
-   We have added old & new values to the audit logs We have added the missing events for role changes
-
-   https://github.com/owncloud/ocis/pull/6537
-
 * Enhancement - Update reva: [#6529](https://github.com/owncloud/ocis/pull/6529)
 
    Update reva to latest edge
diff --git a/changelog/unreleased/audit-events.md b/changelog/unreleased/audit-events.md
deleted file mode 100644
index b1bbef4f510..00000000000
--- a/changelog/unreleased/audit-events.md
+++ /dev/null
@@ -1,6 +0,0 @@
-Enhancement: Add old & new values to audit logs
-
-We have added old & new values to the audit logs
-We have added the missing events for role changes
-
-https://github.com/owncloud/ocis/pull/6537
\ No newline at end of file
diff --git a/changelog/unreleased/bump-reva.md b/changelog/unreleased/bump-reva.md
index 4bc84b11fbc..c24d3eb11d2 100644
--- a/changelog/unreleased/bump-reva.md
+++ b/changelog/unreleased/bump-reva.md
@@ -2,4 +2,28 @@ Enhancement: Update reva
 
 Update reva to latest edge
 
+*   Bugfix [cs3org/reva#3963](https://github.com/cs3org/reva/pull/3963): Treesize interger overflows
+*   Bugfix [cs3org/reva#3943](https://github.com/cs3org/reva/pull/3943): When removing metadata always use correct database and table
+*   Bugfix [cs3org/reva#3978](https://github.com/cs3org/reva/pull/3978): Decomposedfs no longer os.Stats when reading node metadata
+*   Bugfix [cs3org/reva#3959](https://github.com/cs3org/reva/pull/3959): Drop unnecessary stat
+*   Bugfix [cs3org/reva#3948](https://github.com/cs3org/reva/pull/3948): Handle the bad request status
+*   Bugfix [cs3org/reva#3955](https://github.com/cs3org/reva/pull/3955): Fix panic
+*   Bugfix [cs3org/reva#3977](https://github.com/cs3org/reva/pull/3977): Prevent direct access to trash items
+*   Bugfix [cs3org/reva#3933](https://github.com/cs3org/reva/pull/3933): Concurrently invalidate mtime cache in jsoncs3 share manager
+*   Bugfix [cs3org/reva#3985](https://github.com/cs3org/reva/pull/3985): Reduce jsoncs3 lock congestion
+*   Bugfix [cs3org/reva#3960](https://github.com/cs3org/reva/pull/3960): Add trace span details
+*   Bugfix [cs3org/reva#3951](https://github.com/cs3org/reva/pull/3951): Link context in metadata client
+*   Bugfix [cs3org/reva#3950](https://github.com/cs3org/reva/pull/3950): Use plain otel tracing in metadata client
+*   Bugfix [cs3org/reva#3975](https://github.com/cs3org/reva/pull/3975): Decomposedfs now resolves the parent without an os.Stat
+*   Change [cs3org/reva#3947](https://github.com/cs3org/reva/pull/3947): Bump golangci-lint to 1.51.2
+*   Change [cs3org/reva#3945](https://github.com/cs3org/reva/pull/3945): Revert golangci-lint back to 1.50.1
+*   Enhancement [cs3org/reva#3966](https://github.com/cs3org/reva/pull/3966): Add space metadata to ocs shares list
+*   Enhancement [cs3org/reva#3953](https://github.com/cs3org/reva/pull/3953): Client selector pool
+*   Enhancement [cs3org/reva#3941](https://github.com/cs3org/reva/pull/3941): Adding tracing for jsoncs3
+*   Enhancement [cs3org/reva#3965](https://github.com/cs3org/reva/pull/3965): ResumePostprocessing Event
+*   Enhancement [cs3org/reva#3981](https://github.com/cs3org/reva/pull/3981): We have updated the UserFeatureChangedEvent to reflect value changes
+*   Enhancement [cs3org/reva#3986](https://github.com/cs3org/reva/pull/3986): Allow disabling wopi chat
+
+https://github.com/owncloud/ocis/pull/6529
+https://github.com/owncloud/ocis/pull/6544
 https://github.com/owncloud/ocis/pull/6507
diff --git a/go.mod b/go.mod
index ea4e50ab1c0..b2567838e17 100644
--- a/go.mod
+++ b/go.mod
@@ -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.14.1-0.20230615141102-1906a729ee5a
+	github.com/cs3org/reva/v2 v2.14.1-0.20230614134159-186dd7ce3161
 	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
diff --git a/go.sum b/go.sum
index 350e288fffe..ca0da6a6cfa 100644
--- a/go.sum
+++ b/go.sum
@@ -625,8 +625,8 @@ github.com/crewjam/httperr v0.2.0 h1:b2BfXR8U3AlIHwNeFFvZ+BV1LFvKLlzMjzaTnZMybNo
 github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3pglZ5oH4=
 github.com/crewjam/saml v0.4.13 h1:TYHggH/hwP7eArqiXSJUvtOPNzQDyQ7vwmwEqlFWhMc=
 github.com/crewjam/saml v0.4.13/go.mod h1:igEejV+fihTIlHXYP8zOec3V5A8y3lws5bQBFsTm4gA=
-github.com/cs3org/reva/v2 v2.14.1-0.20230615141102-1906a729ee5a h1:T+504loI0dvksiutkzF4ciLfIJD/LJtJFdFJ6d7I7dA=
-github.com/cs3org/reva/v2 v2.14.1-0.20230615141102-1906a729ee5a/go.mod h1:E32krZG159YflDSjDWfx/QGIC2529PS5LiPnGNHu3d0=
+github.com/cs3org/reva/v2 v2.14.1-0.20230614134159-186dd7ce3161 h1:rtitZ/GDtdkP+R56mK7DXzrFuNhi5JGdC0SO3JV7ZJU=
+github.com/cs3org/reva/v2 v2.14.1-0.20230614134159-186dd7ce3161/go.mod h1:E32krZG159YflDSjDWfx/QGIC2529PS5LiPnGNHu3d0=
 github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
 github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
 github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
diff --git a/services/graph/pkg/service/v0/approleassignments.go b/services/graph/pkg/service/v0/approleassignments.go
index 1927d05aee0..81fb693f372 100644
--- a/services/graph/pkg/service/v0/approleassignments.go
+++ b/services/graph/pkg/service/v0/approleassignments.go
@@ -4,9 +4,6 @@ import (
 	"fmt"
 	"net/http"
 
-	revactx "github.com/cs3org/reva/v2/pkg/ctx"
-	"github.com/cs3org/reva/v2/pkg/events"
-	"github.com/cs3org/reva/v2/pkg/utils"
 	"github.com/go-chi/chi/v5"
 	"github.com/go-chi/render"
 	libregraph "github.com/owncloud/libre-graph-api-go"
@@ -57,11 +54,6 @@ func (g Graph) CreateAppRoleAssignment(w http.ResponseWriter, r *http.Request) {
 
 	userID := chi.URLParam(r, "userID")
 
-	// We can ignore the error, in the worst case the old role will be empty
-	oldRoles, _ := g.roleService.ListRoleAssignments(r.Context(), &settingssvc.ListRoleAssignmentsRequest{
-		AccountUuid: userID,
-	})
-
 	if appRoleAssignment.GetPrincipalId() != userID {
 		errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, fmt.Sprintf("user id %s does not match principal id %v", userID, appRoleAssignment.GetPrincipalId()))
 		return
@@ -84,27 +76,6 @@ func (g Graph) CreateAppRoleAssignment(w http.ResponseWriter, r *http.Request) {
 		return
 	}
 
-	var role string
-	roles := oldRoles.GetAssignments()
-	if len(roles) > 0 {
-		role = roles[0].GetRoleId()
-	}
-
-	e := events.UserFeatureChanged{
-		UserID: userID,
-		Features: []events.UserFeature{
-			{
-				Name:     "roleChanged",
-				Value:    appRoleAssignment.AppRoleId,
-				OldValue: &role,
-			},
-		},
-		Timestamp: utils.TSNow(),
-	}
-	if currentUser, ok := revactx.ContextGetUser(r.Context()); ok {
-		e.Executant = currentUser.GetId()
-	}
-	g.publishEvent(e)
 	render.Status(r, http.StatusCreated)
 	render.JSON(w, r, g.assignmentToAppRoleAssignment(artur.GetAssignment()))
 }
diff --git a/services/graph/pkg/service/v0/educationuser.go b/services/graph/pkg/service/v0/educationuser.go
index 3ab8572a287..6f8e1c25234 100644
--- a/services/graph/pkg/service/v0/educationuser.go
+++ b/services/graph/pkg/service/v0/educationuser.go
@@ -361,9 +361,8 @@ func (g Graph) PatchEducationUser(w http.ResponseWriter, r *http.Request) {
 	}
 
 	e := events.UserFeatureChanged{
-		UserID:    nameOrID,
-		Features:  features,
-		Timestamp: utils.TSNow(),
+		UserID:   nameOrID,
+		Features: features,
 	}
 	if currentUser, ok := revactx.ContextGetUser(r.Context()); ok {
 		e.Executant = currentUser.GetId()
diff --git a/services/graph/pkg/service/v0/users.go b/services/graph/pkg/service/v0/users.go
index ed3b962a37e..4421e788227 100644
--- a/services/graph/pkg/service/v0/users.go
+++ b/services/graph/pkg/service/v0/users.go
@@ -9,7 +9,6 @@ import (
 	"reflect"
 	"regexp"
 	"sort"
-	"strconv"
 	"strings"
 
 	"github.com/CiscoM31/godata"
@@ -613,22 +612,6 @@ func (g Graph) PatchUser(w http.ResponseWriter, r *http.Request) {
 		return
 	}
 
-	sanitizedPath := strings.TrimPrefix(r.URL.Path, "/graph/v1.0/")
-
-	odataReq, err := godata.ParseRequest(r.Context(), sanitizedPath, r.URL.Query())
-	if err != nil {
-		logger.Debug().Err(err).Interface("query", r.URL.Query()).Msg("could not get users: query error")
-		errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, err.Error())
-		return
-	}
-
-	oldUserValues, err := g.identityBackend.GetUser(r.Context(), nameOrID, odataReq)
-	if err != nil {
-		logger.Debug().Err(err).Str("id", nameOrID).Msg("could not get user: backend error")
-		errorcode.RenderError(w, r, err)
-		return
-	}
-
 	if nameOrID == "" {
 		logger.Debug().Msg("could not update user: missing user id")
 		errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, "missing user id")
@@ -644,7 +627,7 @@ func (g Graph) PatchUser(w http.ResponseWriter, r *http.Request) {
 	}
 
 	if reflect.ValueOf(*changes).IsZero() {
-		logger.Debug().Interface("body", r.Body).Msg("ignoring empty request body")
+		logger.Debug().Interface("body", r.Body).Msg("ignoring empyt request body")
 		render.Status(r, http.StatusNoContent)
 		render.NoContent(w, r)
 		return
@@ -666,47 +649,19 @@ func (g Graph) PatchUser(w http.ResponseWriter, r *http.Request) {
 				fmt.Sprintf("'%s' is not a valid email address", *mail))
 			return
 		}
-		features = append(features, events.UserFeature{
-			Name:     "email",
-			Value:    *mail,
-			OldValue: oldUserValues.Mail,
-		})
+		features = append(features, events.UserFeature{Name: "email", Value: *mail})
 	}
 
 	if name, ok := changes.GetDisplayNameOk(); ok {
-		features = append(features, events.UserFeature{
-			Name:     "displayname",
-			Value:    *name,
-			OldValue: oldUserValues.DisplayName,
-		})
+		features = append(features, events.UserFeature{Name: "displayname", Value: *name})
 	}
 
-	if userType, ok := changes.GetUserTypeOk(); ok {
+	if changes.HasUserType() {
 		if !isValidUserType(*changes.UserType) {
 			logger.Debug().Interface("user", changes).Msg("invalid userType attribute")
 			errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, "invalid userType attribute, valid options are 'Member' or 'Guest'")
 			return
 		}
-		features = append(features, events.UserFeature{
-			Name:     "changeUserType",
-			Value:    *userType,
-			OldValue: oldUserValues.UserType,
-		})
-	}
-
-	if accEnabled, ok := changes.GetAccountEnabledOk(); ok {
-		oldAccVal := strconv.FormatBool(oldUserValues.GetAccountEnabled())
-		features = append(features, events.UserFeature{
-			Name:     "accountEnabled",
-			Value:    strconv.FormatBool(*accEnabled),
-			OldValue: &oldAccVal,
-		})
-	}
-
-	if changes.HasPasswordProfile() {
-		features = append(features, events.UserFeature{
-			Name: "passwordChanged",
-		})
 	}
 
 	logger.Debug().Str("nameid", nameOrID).Interface("changes", *changes).Msg("calling update user on backend")
@@ -718,9 +673,8 @@ func (g Graph) PatchUser(w http.ResponseWriter, r *http.Request) {
 	}
 
 	e := events.UserFeatureChanged{
-		UserID:    nameOrID,
-		Features:  features,
-		Timestamp: utils.TSNow(),
+		UserID:   nameOrID,
+		Features: features,
 	}
 	if currentUser, ok := revactx.ContextGetUser(r.Context()); ok {
 		e.Executant = currentUser.GetId()
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/events/users.go b/vendor/github.com/cs3org/reva/v2/pkg/events/users.go
index 1a118b71993..205af508a0c 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/events/users.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/events/users.go
@@ -55,9 +55,9 @@ func (UserDeleted) Unmarshal(v []byte) (interface{}, error) {
 
 // UserFeature represents a user feature
 type UserFeature struct {
-	Name     string
-	Value    string
-	OldValue *string
+	Name      string
+	Value     string
+	Timestamp *types.Timestamp
 }
 
 // UserFeatureChanged is emitted when a user feature was changed
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go
index ebcafa4f3b8..3065a168aad 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go
@@ -427,7 +427,7 @@ func (fs *Decomposedfs) GetQuota(ctx context.Context, ref *provider.Reference) (
 	rp, err := fs.p.AssemblePermissions(ctx, n)
 	switch {
 	case err != nil:
-		return 0, 0, 0, err
+		return 0, 0, 0, errtypes.InternalError(err.Error())
 	case !rp.GetQuota && !fs.p.ListAllSpaces(ctx):
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
@@ -534,7 +534,7 @@ func (fs *Decomposedfs) GetPathByID(ctx context.Context, id *provider.ResourceId
 	rp, err := fs.p.AssemblePermissions(ctx, n)
 	switch {
 	case err != nil:
-		return "", err
+		return "", errtypes.InternalError(err.Error())
 	case !rp.GetPath:
 		f := storagespace.FormatResourceID(*id)
 		if rp.Stat {
@@ -581,7 +581,7 @@ func (fs *Decomposedfs) CreateDir(ctx context.Context, ref *provider.Reference)
 	rp, err := fs.p.AssemblePermissions(ctx, n)
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case !rp.CreateContainer:
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
@@ -637,7 +637,7 @@ func (fs *Decomposedfs) TouchFile(ctx context.Context, ref *provider.Reference,
 	rp, err := fs.p.AssemblePermissions(ctx, n)
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case !rp.InitiateFileUpload:
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
@@ -680,7 +680,7 @@ func (fs *Decomposedfs) Move(ctx context.Context, oldRef, newRef *provider.Refer
 	rp, err := fs.p.AssemblePermissions(ctx, oldNode)
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case !rp.Move:
 		f, _ := storagespace.FormatReference(oldRef)
 		if rp.Stat {
@@ -700,7 +700,7 @@ func (fs *Decomposedfs) Move(ctx context.Context, oldRef, newRef *provider.Refer
 	rp, err = fs.p.AssemblePermissions(ctx, newNode)
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case oldNode.IsDir() && !rp.CreateContainer:
 		f, _ := storagespace.FormatReference(newRef)
 		if rp.Stat {
@@ -746,7 +746,7 @@ func (fs *Decomposedfs) GetMD(ctx context.Context, ref *provider.Reference, mdKe
 	rp, err := fs.p.AssemblePermissions(ctx, node)
 	switch {
 	case err != nil:
-		return nil, err
+		return nil, errtypes.InternalError(err.Error())
 	case !rp.Stat:
 		f, _ := storagespace.FormatReference(ref)
 		return nil, errtypes.NotFound(f)
@@ -790,7 +790,7 @@ func (fs *Decomposedfs) ListFolder(ctx context.Context, ref *provider.Reference,
 	rp, err := fs.p.AssemblePermissions(ctx, n)
 	switch {
 	case err != nil:
-		return nil, err
+		return nil, errtypes.InternalError(err.Error())
 	case !rp.ListContainer:
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
@@ -881,7 +881,7 @@ func (fs *Decomposedfs) Delete(ctx context.Context, ref *provider.Reference) (er
 	rp, err := fs.p.AssemblePermissions(ctx, node)
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case !rp.Delete:
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
@@ -921,7 +921,7 @@ func (fs *Decomposedfs) Download(ctx context.Context, ref *provider.Reference) (
 	rp, err := fs.p.AssemblePermissions(ctx, node)
 	switch {
 	case err != nil:
-		return nil, err
+		return nil, errtypes.InternalError(err.Error())
 	case !rp.InitiateFileDownload:
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
@@ -952,7 +952,7 @@ func (fs *Decomposedfs) GetLock(ctx context.Context, ref *provider.Reference) (*
 	rp, err := fs.p.AssemblePermissions(ctx, node)
 	switch {
 	case err != nil:
-		return nil, err
+		return nil, errtypes.InternalError(err.Error())
 	case !rp.InitiateFileDownload:
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
@@ -978,7 +978,7 @@ func (fs *Decomposedfs) SetLock(ctx context.Context, ref *provider.Reference, lo
 	rp, err := fs.p.AssemblePermissions(ctx, node)
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case !rp.InitiateFileUpload:
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
@@ -1008,7 +1008,7 @@ func (fs *Decomposedfs) RefreshLock(ctx context.Context, ref *provider.Reference
 	rp, err := fs.p.AssemblePermissions(ctx, node)
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case !rp.InitiateFileUpload:
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
@@ -1038,7 +1038,7 @@ func (fs *Decomposedfs) Unlock(ctx context.Context, ref *provider.Reference, loc
 	rp, err := fs.p.AssemblePermissions(ctx, node)
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case !rp.InitiateFileUpload: // TODO do we need a dedicated permission?
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/grants.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/grants.go
index 3c053d71da4..0e162e6aabe 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/grants.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/grants.go
@@ -63,7 +63,7 @@ func (fs *Decomposedfs) DenyGrant(ctx context.Context, ref *provider.Reference,
 
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case !rp.DenyGrant:
 		return errtypes.PermissionDenied(filepath.Join(grantNode.ParentID, grantNode.Name))
 	}
@@ -102,7 +102,7 @@ func (fs *Decomposedfs) AddGrant(ctx context.Context, ref *provider.Reference, g
 		rp, err := fs.p.AssemblePermissions(ctx, grantNode)
 		switch {
 		case err != nil:
-			return err
+			return errtypes.InternalError(err.Error())
 		case !rp.AddGrant:
 			f, _ := storagespace.FormatReference(ref)
 			if rp.Stat {
@@ -128,7 +128,7 @@ func (fs *Decomposedfs) ListGrants(ctx context.Context, ref *provider.Reference)
 	rp, err := fs.p.AssemblePermissions(ctx, grantNode)
 	switch {
 	case err != nil:
-		return nil, err
+		return nil, errtypes.InternalError(err.Error())
 	case !rp.ListGrants && !rp.Stat:
 		f, _ := storagespace.FormatReference(ref)
 		return nil, errtypes.NotFound(f)
@@ -186,7 +186,7 @@ func (fs *Decomposedfs) RemoveGrant(ctx context.Context, ref *provider.Reference
 		rp, err := fs.p.AssemblePermissions(ctx, grantNode)
 		switch {
 		case err != nil:
-			return err
+			return errtypes.InternalError(err.Error())
 		case !rp.RemoveGrant:
 			f, _ := storagespace.FormatReference(ref)
 			if rp.Stat {
@@ -262,7 +262,7 @@ func (fs *Decomposedfs) UpdateGrant(ctx context.Context, ref *provider.Reference
 		rp, err := fs.p.AssemblePermissions(ctx, grantNode)
 		switch {
 		case err != nil:
-			return err
+			return errtypes.InternalError(err.Error())
 		case !rp.UpdateGrant:
 			f, _ := storagespace.FormatReference(ref)
 			if rp.Stat {
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/metadata.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/metadata.go
index 97a35b346d6..31c96fef0af 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/metadata.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/metadata.go
@@ -52,7 +52,7 @@ func (fs *Decomposedfs) SetArbitraryMetadata(ctx context.Context, ref *provider.
 	rp, err := fs.p.AssemblePermissions(ctx, n)
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case !rp.InitiateFileUpload: // TODO add explicit SetArbitraryMetadata grant to CS3 api, tracked in https://github.com/cs3org/cs3apis/issues/91
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
@@ -145,7 +145,7 @@ func (fs *Decomposedfs) UnsetArbitraryMetadata(ctx context.Context, ref *provide
 	rp, err := fs.p.AssemblePermissions(ctx, n)
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case !rp.InitiateFileUpload: // TODO use SetArbitraryMetadata grant to CS3 api, tracked in https://github.com/cs3org/cs3apis/issues/91
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node/node.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node/node.go
index f154d2db02b..ea86aaee29a 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node/node.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node/node.go
@@ -406,11 +406,11 @@ func (n *Node) Child(ctx context.Context, name string) (*Node, error) {
 }
 
 // ParentWithReader returns the parent node
-func (n *Node) ParentWithReader(r io.Reader) (*Node, error) {
+func (n *Node) ParentWithReader(r io.Reader) (p *Node, err error) {
 	if n.ParentID == "" {
 		return nil, fmt.Errorf("decomposedfs: root has no parent")
 	}
-	p := &Node{
+	p = &Node{
 		SpaceID:   n.SpaceID,
 		lu:        n.lu,
 		ID:        n.ParentID,
@@ -418,19 +418,17 @@ func (n *Node) ParentWithReader(r io.Reader) (*Node, error) {
 	}
 
 	// fill metadata cache using the reader
-	attrs, err := p.XattrsWithReader(r)
-	switch {
-	case metadata.IsNotExist(err):
-		return p, nil // swallow not found, the node defaults to exists = false
-	case err != nil:
-		return nil, err
-	}
-	p.Exists = true
+	_, _ = p.XattrsWithReader(r)
 
-	p.Name = attrs.String(prefixes.NameAttr)
-	p.ParentID = attrs.String(prefixes.ParentidAttr)
+	// lookup name and parent id in extended attributes
+	p.ParentID, _ = p.XattrString(prefixes.ParentidAttr)
+	p.Name, _ = p.XattrString(prefixes.NameAttr)
 
-	return p, err
+	// check node exists
+	if _, err := os.Stat(p.InternalPath()); err == nil {
+		p.Exists = true
+	}
+	return
 }
 
 // Parent returns the parent node
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node/permissions.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node/permissions.go
index 2401510f351..0899ba2c695 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node/permissions.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node/permissions.go
@@ -98,16 +98,6 @@ func NewPermissions(lu PathLookup) *Permissions {
 
 // AssemblePermissions will assemble the permissions for the current user on the given node, taking into account all parent nodes
 func (p *Permissions) AssemblePermissions(ctx context.Context, n *Node) (ap provider.ResourcePermissions, err error) {
-	return p.assemblePermissions(ctx, n, true)
-}
-
-// AssembleTrashPermissions will assemble the permissions for the current user on the given node, taking into account all parent nodes
-func (p *Permissions) AssembleTrashPermissions(ctx context.Context, n *Node) (ap provider.ResourcePermissions, err error) {
-	return p.assemblePermissions(ctx, n, false)
-}
-
-// assemblePermissions will assemble the permissions for the current user on the given node, taking into account all parent nodes
-func (p *Permissions) assemblePermissions(ctx context.Context, n *Node, failOnTrashedSubtree bool) (ap provider.ResourcePermissions, err error) {
 	u, ok := ctxpkg.ContextGetUser(ctx)
 	if !ok {
 		return NoPermissions(), nil
@@ -124,9 +114,16 @@ func (p *Permissions) assemblePermissions(ctx context.Context, n *Node, failOnTr
 		n.ID = kp[0]
 	}
 
+	// check if the current user is the owner
+	if utils.UserIDEqual(u.Id, n.Owner()) {
+		return OwnerPermissions(), nil
+	}
 	// determine root
+
 	rn := n.SpaceRoot
+
 	cn := n
+
 	ap = provider.ResourcePermissions{}
 
 	// for an efficient group lookup convert the list of groups to a map
@@ -157,10 +154,6 @@ func (p *Permissions) assemblePermissions(ctx context.Context, n *Node, failOnTr
 			// We do not have a parent, so we assume the next valid parent is the spaceRoot (which must always exist)
 			cn = n.SpaceRoot
 		}
-		if failOnTrashedSubtree && !cn.Exists {
-			return NoPermissions(), errtypes.NotFound(n.ID)
-		}
-
 	}
 
 	// for the root node
@@ -174,11 +167,6 @@ func (p *Permissions) assemblePermissions(ctx context.Context, n *Node, failOnTr
 		appctx.GetLogger(ctx).Error().Err(err).Interface("node", cn.ID).Msg("error reading root node permissions")
 	}
 
-	// check if the current user is the owner
-	if utils.UserIDEqual(u.Id, n.Owner()) {
-		return OwnerPermissions(), nil
-	}
-
 	appctx.GetLogger(ctx).Debug().Interface("permissions", ap).Interface("node", n.ID).Interface("user", u).Msg("returning agregated permissions")
 	return ap, nil
 }
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/recycle.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/recycle.go
index 8cbbc120fa6..18598ef9805 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/recycle.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/recycle.go
@@ -62,10 +62,10 @@ func (fs *Decomposedfs) ListRecycle(ctx context.Context, ref *provider.Reference
 	if err != nil {
 		return nil, err
 	}
-	rp, err := fs.p.AssembleTrashPermissions(ctx, trashnode)
+	rp, err := fs.p.AssemblePermissions(ctx, trashnode)
 	switch {
 	case err != nil:
-		return nil, err
+		return nil, errtypes.InternalError(err.Error())
 	case !rp.ListRecycle:
 		if rp.Stat {
 			return nil, errtypes.PermissionDenied(key)
@@ -300,10 +300,10 @@ func (fs *Decomposedfs) RestoreRecycleItem(ctx context.Context, ref *provider.Re
 	}
 
 	// check permissions of deleted node
-	rp, err := fs.p.AssembleTrashPermissions(ctx, rn)
+	rp, err := fs.p.AssemblePermissions(ctx, rn)
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case !rp.RestoreRecycleItem:
 		if rp.Stat {
 			return errtypes.PermissionDenied(key)
@@ -318,7 +318,7 @@ func (fs *Decomposedfs) RestoreRecycleItem(ctx context.Context, ref *provider.Re
 	pp, err := fs.p.AssemblePermissions(ctx, parent)
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case !pp.InitiateFileUpload:
 		// share receiver cannot restore to a shared resource to which she does not have write permissions.
 		if rp.Stat {
@@ -346,10 +346,10 @@ func (fs *Decomposedfs) PurgeRecycleItem(ctx context.Context, ref *provider.Refe
 	}
 
 	// check permissions of deleted node
-	rp, err := fs.p.AssembleTrashPermissions(ctx, rn)
+	rp, err := fs.p.AssemblePermissions(ctx, rn)
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case !rp.PurgeRecycle:
 		if rp.Stat {
 			return errtypes.PermissionDenied(key)
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/revisions.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/revisions.go
index be40c727f9a..e023ee98acb 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/revisions.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/revisions.go
@@ -57,7 +57,7 @@ func (fs *Decomposedfs) ListRevisions(ctx context.Context, ref *provider.Referen
 	rp, err := fs.p.AssemblePermissions(ctx, n)
 	switch {
 	case err != nil:
-		return nil, err
+		return nil, errtypes.InternalError(err.Error())
 	case !rp.ListFileVersions:
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
@@ -136,7 +136,7 @@ func (fs *Decomposedfs) DownloadRevision(ctx context.Context, ref *provider.Refe
 	rp, err := fs.p.AssemblePermissions(ctx, n)
 	switch {
 	case err != nil:
-		return nil, err
+		return nil, errtypes.InternalError(err.Error())
 	case !rp.ListFileVersions || !rp.InitiateFileDownload: // TODO add explicit permission in the CS3 api?
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
@@ -190,7 +190,7 @@ func (fs *Decomposedfs) RestoreRevision(ctx context.Context, ref *provider.Refer
 	rp, err := fs.p.AssemblePermissions(ctx, n)
 	switch {
 	case err != nil:
-		return err
+		return errtypes.InternalError(err.Error())
 	case !rp.RestoreFileVersion:
 		f, _ := storagespace.FormatReference(ref)
 		if rp.Stat {
@@ -327,7 +327,7 @@ func (fs *Decomposedfs) getRevisionNode(ctx context.Context, ref *provider.Refer
 	p, err := fs.p.AssemblePermissions(ctx, n)
 	switch {
 	case err != nil:
-		return nil, err
+		return nil, errtypes.InternalError(err.Error())
 	case !hasPermission(&p):
 		return nil, errtypes.PermissionDenied(filepath.Join(n.ParentID, n.Name))
 	}
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/spacepermissions.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/spacepermissions.go
index 0a8d990b86c..010484a0667 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/spacepermissions.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/spacepermissions.go
@@ -17,7 +17,6 @@ import (
 // PermissionsChecker defines an interface for checking permissions on a Node
 type PermissionsChecker interface {
 	AssemblePermissions(ctx context.Context, n *node.Node) (ap provider.ResourcePermissions, err error)
-	AssembleTrashPermissions(ctx context.Context, n *node.Node) (ap provider.ResourcePermissions, err error)
 }
 
 // CS3PermissionsClient defines an interface for checking permissions against the CS3 permissions service
@@ -41,11 +40,6 @@ func (p Permissions) AssemblePermissions(ctx context.Context, n *node.Node) (pro
 	return p.item.AssemblePermissions(ctx, n)
 }
 
-// AssembleTrashPermissions is used to assemble file permissions
-func (p Permissions) AssembleTrashPermissions(ctx context.Context, n *node.Node) (provider.ResourcePermissions, error) {
-	return p.item.AssembleTrashPermissions(ctx, n)
-}
-
 // CreateSpace returns true when the user is allowed to create the space
 func (p Permissions) CreateSpace(ctx context.Context, spaceid string) bool {
 	return p.checkPermission(ctx, "Drives.Create", spaceRef(spaceid))
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/spaces.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/spaces.go
index b78ec624e62..77fda613610 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/spaces.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/spaces.go
@@ -554,7 +554,7 @@ func (fs *Decomposedfs) UpdateStorageSpace(ctx context.Context, req *provider.Up
 	sp, err := fs.p.AssemblePermissions(ctx, spaceNode)
 	if err != nil {
 		return &provider.UpdateStorageSpaceResponse{
-			Status: status.NewStatusFromErrType(ctx, "assembling permissions failed", err),
+			Status: &v1beta11.Status{Code: v1beta11.Code_CODE_INVALID, Message: err.Error()},
 		}, nil
 
 	}
@@ -793,7 +793,7 @@ func (fs *Decomposedfs) storageSpaceFromNode(ctx context.Context, n *node.Node,
 		rp, err := fs.p.AssemblePermissions(ctx, n)
 		switch {
 		case err != nil:
-			return nil, err
+			return nil, errtypes.InternalError(err.Error())
 		case !rp.Stat:
 			return nil, errtypes.NotFound(fmt.Sprintf("space %s not found", n.ID))
 		}
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/processing.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/processing.go
index 1af0cfb6e48..3ba1a044519 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/processing.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/upload/processing.go
@@ -114,7 +114,7 @@ func New(ctx context.Context, info tusd.FileInfo, lu *lookup.Lookup, tp Tree, p
 	rp, err := p.AssemblePermissions(ctx, checkNode)
 	switch {
 	case err != nil:
-		return nil, err
+		return nil, errtypes.InternalError(err.Error())
 	case !rp.InitiateFileUpload:
 		return nil, errtypes.PermissionDenied(path)
 	}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index c8906b155b1..0a25c1e199c 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -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.14.1-0.20230615141102-1906a729ee5a
+# github.com/cs3org/reva/v2 v2.14.1-0.20230614134159-186dd7ce3161
 ## explicit; go 1.20
 github.com/cs3org/reva/v2/cmd/revad/internal/grace
 github.com/cs3org/reva/v2/cmd/revad/runtime


Test patch:
diff --git a/changelog/unreleased/bump-reva-latest.md b/changelog/unreleased/bump-reva-latest.md
deleted file mode 100644
index b5d1947cc84..00000000000
--- a/changelog/unreleased/bump-reva-latest.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Enhancement: Update reva
-
-Update reva to latest edge
-
-https://github.com/owncloud/ocis/pull/6529
diff --git a/services/graph/pkg/service/v0/approleassignments_test.go b/services/graph/pkg/service/v0/approleassignments_test.go
index 7315df703e3..b67165c5260 100644
--- a/services/graph/pkg/service/v0/approleassignments_test.go
+++ b/services/graph/pkg/service/v0/approleassignments_test.go
@@ -139,12 +139,6 @@ var _ = Describe("AppRoleAssignments", func() {
 				AccountUuid: user.GetId(),
 				RoleId:      "some-appRole-ID",
 			}
-			roleService.On("ListRoleAssignments", mock.Anything, mock.Anything, mock.Anything).Return(&settings.ListRoleAssignmentsResponse{
-				Assignments: []*settingsmsg.UserRoleAssignment{
-					userRoleAssignment,
-				},
-			}, nil)
-
 			roleService.On("AssignRoleToUser", mock.Anything, mock.Anything, mock.Anything).Return(&settings.AssignRoleToUserResponse{Assignment: userRoleAssignment}, nil)
 
 			ara := libregraph.NewAppRoleAssignmentWithDefaults()
diff --git a/services/graph/pkg/service/v0/users_test.go b/services/graph/pkg/service/v0/users_test.go
index 38ee8434993..5dbe88f5f79 100644
--- a/services/graph/pkg/service/v0/users_test.go
+++ b/services/graph/pkg/service/v0/users_test.go
@@ -809,7 +809,7 @@ var _ = Describe("Users", func() {
 			user.SetMail("user@example.com")
 			user.SetId("/users/user")
 
-			identityBackend.On("GetUser", mock.Anything, mock.Anything, mock.Anything).Return(user, nil)
+			identityBackend.On("GetUser", mock.Anything, mock.Anything, mock.Anything).Return(&user, nil)
 		})
 
 		It("handles missing userids", func() {
@@ -866,7 +866,7 @@ var _ = Describe("Users", func() {
 			data, err := json.Marshal(user)
 			Expect(err).ToNot(HaveOccurred())
 
-			r := httptest.NewRequest(http.MethodPost, "/graph/v1.0/users", bytes.NewBuffer(data))
+			r := httptest.NewRequest(http.MethodPost, "/graph/v1.0/users?$invalid=true", bytes.NewBuffer(data))
 			rctx := chi.NewRouteContext()
 			rctx.URLParams.Add("userID", user.GetId())
 			r = r.WithContext(context.WithValue(revactx.ContextSetUser(ctx, currentUser), chi.RouteCtxKey, rctx))