diff --git a/.gitignore b/.gitignore index 36bc7572f..b642776ca 100644 --- a/.gitignore +++ b/.gitignore @@ -50,4 +50,5 @@ tunnel.log .develop.env **/result **/result-* -.develop.cmd \ No newline at end of file +.develop.cmd +/.vscode \ No newline at end of file diff --git a/src/Foundation/Yesod/Auth.hs b/src/Foundation/Yesod/Auth.hs index b3fbced9b..efabadc80 100644 --- a/src/Foundation/Yesod/Auth.hs +++ b/src/Foundation/Yesod/Auth.hs @@ -263,8 +263,8 @@ decodeUser now UserDefaultConf{..} upsertMode ldapData = do userEmail <- if -- TODO: refactor! NOTE: LDAP doesnt know email for all users; we use userPrincialName instead; however validEmail refutes `E return $ CI.mk userEmail - -- | userEmail : _ <- mapMaybe (assertM validEmail . either (const Nothing) Just . Text.decodeUtf8') (lookupSome ldapMap $ toList ldapUserEmail) -- TOO STRONG, see above! - -- -> return $ CI.mk userEmail + -- | userEmail : _ <- mapMaybe (assertM validEmail . either (const Nothing) Just . Text.decodeUtf8') (lookupSome ldapMap $ toList ldapUserEmail) -- TOO STRONG, see above! + -- -> return $ CI.mk userEmail | otherwise -> throwM CampusUserInvalidEmail diff --git a/src/Handler/Admin/Avs.hs b/src/Handler/Admin/Avs.hs index 99751e95c..90fd59ad6 100644 --- a/src/Handler/Admin/Avs.hs +++ b/src/Handler/Admin/Avs.hs @@ -44,7 +44,7 @@ single = uncurry Map.singleton -- Button only needed in AVS TEST; further buttons see below -data ButtonAvsTest = BtnCheckLicences -- | BtnSynchLicences +data ButtonAvsTest = BtnCheckLicences -- | BtnSynchLicences deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonAvsTest instance Finite ButtonAvsTest diff --git a/src/Model/Types/Avs.hs b/src/Model/Types/Avs.hs index f1937c736..dc58f1087 100644 --- a/src/Model/Types/Avs.hs +++ b/src/Model/Types/Avs.hs @@ -254,7 +254,7 @@ instance FromJSON AvsLicence where parseJSON (Number n) | n == 1 = pure AvsLicenceVorfeld -- ordered by occurrence, n==1 is most common case | n == 2 = pure AvsLicenceRollfeld | n == 0 = pure AvsNoLicence - -- | n ==(-1) = pure AvsNoLicenceGuest -- InfoContact may send -1 for Guest unable to obtain a licence + {- | n ==(-1) = pure AvsNoLicenceGuest -- InfoContact may send -1 for Guest unable to obtain a licence -} #ifdef DEVELOPMENT parseJSON invalid = prependFailure "parsing AvsLicence failed, " $ fail $ "expected Int value being 0, 1 or 2. Found " ++ show invalid #else diff --git a/src/Utils/Avs.hs b/src/Utils/Avs.hs index 9f19af2b6..27932acda 100644 --- a/src/Utils/Avs.hs +++ b/src/Utils/Avs.hs @@ -101,7 +101,7 @@ splitQuery :: (Wrapped a, Wrapped c, Unwrapped a ~ Set b, Semigroup (Unwrapped c splitQuery rawQuery q | avsMaxQueryAtOnce >= Set.size s = rawQuery q | otherwise = do - -- $logInfoS "AVS" $ "Splitting large query for input Set " <> tshow (Set.size s) -- would require MonadLogger ClientM + -- logInfoS "AVS" $ "Splitting large query for input Set " <> tshow (Set.size s) -- would require MonadLogger ClientM let (avsid1, avsid2) = Set.splitAt avsMaxQueryAtOnce s res1 <- rawQuery $ view _Unwrapped' avsid1 res2 <- splitQuery rawQuery $ view _Unwrapped' avsid2 diff --git a/src/Utils/Csv/Mail.hs b/src/Utils/Csv/Mail.hs index f88fe6974..b14fc73cc 100644 --- a/src/Utils/Csv/Mail.hs +++ b/src/Utils/Csv/Mail.hs @@ -56,11 +56,11 @@ recodeCsv encOpts toUser act = fromMaybe act $ do inp <- C.sinkLazy inp' <- recode inp sourceLazy inp' .| act - -- -- | FormatXlsx <- fmt -> do - -- -- inp <- C.sinkLazy - -- -- archive <- throwLeft $ Zip.toArchiveOrFail inp - -- -- archive' <- traverseOf (_zEntries . traverse . _Entrty . _3) recode archive - -- -- sourceLazy (Zip.fromArchive inp') .| act + -- | FormatXlsx <- fmt -> do + -- inp <- C.sinkLazy + -- archive <- throwLeft $ Zip.toArchiveOrFail inp + -- archive' <- traverseOf (_zEntries . traverse . _Entrty . _3) recode archive + -- sourceLazy (Zip.fromArchive inp') .| act | otherwise -> act where