mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Security: Use individual preview tokens for each user account #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -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))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user