Security: Use individual preview tokens for each user account #98

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2022-10-13 22:11:02 +02:00
parent ccfdf22590
commit 884dea17de
119 changed files with 1394 additions and 581 deletions

View File

@@ -24,12 +24,8 @@ func GetClientConfig(router *gin.RouterGroup) {
if s == nil {
c.JSON(http.StatusOK, conf.ClientPublic())
} else if s.User().IsVisitor() {
c.JSON(http.StatusOK, conf.ClientShare())
} else if s.User().IsRegistered() {
c.JSON(http.StatusOK, conf.ClientSession(s))
} else {
c.JSON(http.StatusOK, conf.ClientPublic())
c.JSON(http.StatusOK, conf.ClientSession(s))
}
})
}