Skip to content

Commit

Permalink
Implement setting arbitrary metadata for the public storage provider (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christofas committed Nov 29, 2021
1 parent ab589cf commit 79fb299
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
7 changes: 7 additions & 0 deletions changelog/unreleased/fix-public-link-wopi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Fix app provider for editor public links

Fixed opening the app provider in public links with the editor permission.
The app provider failed to open the file in read write mode.

https://github.com/owncloud/ocis/issues/2803
https://github.com/cs3org/reva/pull/2310
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,16 @@ func New(m map[string]interface{}, ss *grpc.Server) (rgrpc.Service, error) {
}

func (s *service) SetArbitraryMetadata(ctx context.Context, req *provider.SetArbitraryMetadataRequest) (*provider.SetArbitraryMetadataResponse, error) {
return nil, gstatus.Errorf(codes.Unimplemented, "method not implemented")
ref, _, _, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref)
switch {
case err != nil:
return nil, err
case st != nil:
return &provider.SetArbitraryMetadataResponse{
Status: st,
}, nil
}
return s.gateway.SetArbitraryMetadata(ctx, &provider.SetArbitraryMetadataRequest{Opaque: req.Opaque, Ref: ref, ArbitraryMetadata: req.ArbitraryMetadata})
}

func (s *service) UnsetArbitraryMetadata(ctx context.Context, req *provider.UnsetArbitraryMetadataRequest) (*provider.UnsetArbitraryMetadataResponse, error) {
Expand Down

0 comments on commit 79fb299

Please sign in to comment.