Non-public media should only be visible to connected users.

This commit is contained in:
Feufochmar 2021-05-24 19:17:44 +02:00
parent 93759e2df2
commit bcb29fc7c4
1 changed files with 4 additions and 1 deletions

View File

@ -479,7 +479,7 @@
(define direct-link (media-link 'get file))
(define media (get-media-by-file file))
(cond
( media
( (and media (or (media-public? media) connected-usr))
( (pages:template
#:title (displayed-name (media-name media) (media-public? media))
#:author (media-author media)
@ -499,6 +499,9 @@
'())
))
param))
( media
; Media exists, but is private => not authorized
(pages:notepad:error param 'unauthorized))
( #t
(pages:notepad:error param 'not-found))))