Skip to content

Commit

Permalink
ocdav: replace public mountpoint fileid with grant fileid
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Mar 21, 2022
1 parent f08e8c1 commit f0d8b7b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/http/services/owncloud/ocdav/propfind/propfind.go
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,11 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
sublog.Debug().Interface("role", role).Str("dav-permissions", wdp).Msg("converted PermissionSet")
}

// replace fileid of /public/{token} mountpoint with grant fileid
if ls != nil && md.Id != nil && md.Id.StorageId == utils.PublicStorageProviderID && md.Id.OpaqueId == ls.Token {
md.Id = ls.ResourceId
}

propstatOK := PropstatXML{
Status: "HTTP/1.1 200 OK",
Prop: []*props.PropertyXML{},
Expand Down

0 comments on commit f0d8b7b

Please sign in to comment.