mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Sharing: ACL authorization for REST API #18
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/photoprism/photoprism/internal/config"
|
||||
"github.com/photoprism/photoprism/internal/photoprism"
|
||||
"github.com/photoprism/photoprism/internal/query"
|
||||
"github.com/photoprism/photoprism/pkg/fs"
|
||||
@@ -21,9 +20,9 @@ import (
|
||||
//
|
||||
// Parameters:
|
||||
// hash: string The file hash as returned by the search API
|
||||
func GetDownload(router *gin.RouterGroup, conf *config.Config) {
|
||||
func GetDownload(router *gin.RouterGroup) {
|
||||
router.GET("/dl/:hash", func(c *gin.Context) {
|
||||
if InvalidDownloadToken(c, conf) {
|
||||
if InvalidDownloadToken(c) {
|
||||
c.Data(http.StatusForbidden, "image/svg+xml", brokenIconSvg)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user