diff --git a/changelog/unreleased/fix-upload-lw-accounts-single-file-share.md b/changelog/unreleased/fix-upload-lw-accounts-single-file-share.md new file mode 100644 index 0000000000..46b447c49b --- /dev/null +++ b/changelog/unreleased/fix-upload-lw-accounts-single-file-share.md @@ -0,0 +1,3 @@ +Bugfix: Fix upload in a single file share for lightweight accounts + +https://github.com/cs3org/reva/pull/3838 diff --git a/internal/grpc/interceptors/auth/scope.go b/internal/grpc/interceptors/auth/scope.go index 63775539aa..b40e6125df 100644 --- a/internal/grpc/interceptors/auth/scope.go +++ b/internal/grpc/interceptors/auth/scope.go @@ -163,6 +163,11 @@ func checkLightweightScope(ctx context.Context, req interface{}, tokenScope map[ InitiateFileUpload: true, }) case *provider.InitiateFileUploadRequest: + if hasPermissions(ctx, client, r.GetRef(), &provider.ResourcePermissions{ + InitiateFileUpload: true, + }) { + return true + } parent, err := parentOfResource(ctx, client, r.GetRef()) if err != nil { return false