From 4ff51c8f6f48f22a8b4f7ca0c81bc2c38d43b32a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 3 Mar 2024 04:35:39 +0100 Subject: [PATCH] chore: add TODOs and debug logs --- models/users.model | 2 +- src/Foundation/Yesod/Auth.hs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/models/users.model b/models/users.model index c8611022e..fdbdb6fcf 100644 --- a/models/users.model +++ b/models/users.model @@ -56,7 +56,7 @@ User json -- Each Uni2work user has a corresponding row in this table; create -- | User data fetched from external user sources, used for authentication and data queries ExternalUser - user UserId + user UserId -- TODO: use UserIdent or Text instead; not every external user may have ever logged in (or needs to), i.e. users that have been queried in admin handler! source AuthSourceIdent -- Identifier of the external source in the config data Value "default='{}'::jsonb" -- Raw user data from external source -- TODO: maybe make Maybe, iff the source only ever responds with "success"? lastSync UTCTime -- When was the external source last queried? diff --git a/src/Foundation/Yesod/Auth.hs b/src/Foundation/Yesod/Auth.hs index b9283124d..69a967e00 100644 --- a/src/Foundation/Yesod/Auth.hs +++ b/src/Foundation/Yesod/Auth.hs @@ -56,6 +56,7 @@ authenticate creds@Creds{..} = liftHandler . runDB . withReaderT projectBackend now <- liftIO getCurrentTime userAuthConf <- getsYesod $ view _appUserAuthConf + $logErrorS "authenticate AuthConf Debug" $ "\27[31m" <> tshow userAuthConf <> "\27[0m" -- TODO: debug only let uAuth = UniqueAuthentication $ CI.mk credsIdent