Don't show thumbnails for secureview shares
Co-authored-by: Julian Koberg <jkoberg@owncloud.com> Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
co-authored by
Julian Koberg
parent
288203b785
commit
1012a399ae
@@ -123,6 +123,10 @@ func (g Thumbnail) handleCS3Source(ctx context.Context, req *thumbnailssvc.GetTh
|
||||
return "", err
|
||||
}
|
||||
|
||||
if !sRes.GetInfo().GetPermissionSet().GetInitiateFileDownload() {
|
||||
return "", merrors.Forbidden(g.serviceID, "no download permission")
|
||||
}
|
||||
|
||||
tType := thumbnail.GetExtForMime(sRes.GetInfo().GetMimeType())
|
||||
if tType == "" {
|
||||
tType = req.GetThumbnailType().String()
|
||||
@@ -206,6 +210,10 @@ func (g Thumbnail) handleWebdavSource(ctx context.Context, req *thumbnailssvc.Ge
|
||||
return "", err
|
||||
}
|
||||
|
||||
if !sRes.GetInfo().GetPermissionSet().GetInitiateFileDownload() {
|
||||
return "", merrors.Forbidden(g.serviceID, "no download permission")
|
||||
}
|
||||
|
||||
tType := thumbnail.GetExtForMime(sRes.GetInfo().GetMimeType())
|
||||
if tType == "" {
|
||||
tType = req.GetThumbnailType().String()
|
||||
|
||||
Reference in New Issue
Block a user