Auth: Remove redundant preview/download token wiring for JWT #5230

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-10-29 15:21:49 +01:00
parent 6e43f14476
commit 630506e021
3 changed files with 14 additions and 33 deletions

View File

@@ -112,18 +112,6 @@ func authAnyJWT(c *gin.Context, clientIP, authToken string, resource acl.Resourc
IssuedAt: issuedAt,
NotBefore: notBefore,
ExpiresAt: expiresAt,
PreviewToken: func() string {
if tokenScopes.Contains(acl.ResourceFiles.String()) {
return conf.PreviewToken()
}
return ""
}(),
DownloadToken: func() string {
if tokenScopes.Contains(acl.ResourceFiles.String()) {
return conf.DownloadToken()
}
return ""
}(),
})
}