Auth: Add "node" and "portal" roles, refactor session entity #98

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-09-18 13:33:18 +02:00
parent 2a116cffb3
commit 887a39e7d9
42 changed files with 297 additions and 266 deletions

View File

@@ -243,7 +243,7 @@ func checkUserPasscodeAuth(c *gin.Context, action acl.Permission) (*entity.Sessi
uid := clean.UID(c.Param("uid"))
// Get user from session.
user := s.User()
user := s.GetUser()
// Regular users can only set up a passcode for their own account.
if user.UserUID != uid || !user.CanLogIn() {