Skip to content

Commit

Permalink
Fixes #24757: Unable to log in - Server error
Browse files Browse the repository at this point in the history
  • Loading branch information
clarktsiory committed Apr 19, 2024
1 parent a16969f commit 8ae5414
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ case class UserSession(
authMethod: String,
permissions: List[String],
authz: List[String],
tenants: String,
tenants: Option[String],
endDate: Option[DateTime],
endCause: Option[String]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class InMemoryUserRepository(userBase: Ref[Map[String, UserInfo]], sessionBase:
date: DateTime
): IOResult[Unit] = {
sessionBase.update(
UserSession(userId, sessionId, date, authenticatorName, permissions.sorted, authz.sorted, tenants, None, None) :: _
UserSession(userId, sessionId, date, authenticatorName, permissions.sorted, authz.sorted, Some(tenants), None, None) :: _
) *>
userBase.update(_.map { case (k, v) => if (k == userId) (k, v.modify(_.lastLogin).setTo(Some(date))) else (k, v) })
}
Expand Down

0 comments on commit 8ae5414

Please sign in to comment.