chore(lms): fix password in fake user
This commit is contained in:
parent
ad937cda8c
commit
87b3214c84
@ -67,7 +67,7 @@ fakeQualificationUsers (Entity qid Qualification{qualificationRefreshWithin}) (u
|
|||||||
let pw = "123.456"
|
let pw = "123.456"
|
||||||
PWHashConf{..} <- getsYesod $ view _appAuthPWHash
|
PWHashConf{..} <- getsYesod $ view _appAuthPWHash
|
||||||
pwHash <- liftIO $ PWStore.makePasswordWith pwHashAlgorithm pw pwHashStrength
|
pwHash <- liftIO $ PWStore.makePasswordWith pwHashAlgorithm pw pwHashStrength
|
||||||
return $ AuthPWHash $ TEnc.decodeUtf8 pwHash
|
return $ TEnc.decodeUtf8 pwHash
|
||||||
theSupervisor <- selectKeysList [UserSurname ==. "Jost", UserFirstName ==. "Steffen"] [Asc UserCreated, LimitTo 1]
|
theSupervisor <- selectKeysList [UserSurname ==. "Jost", UserFirstName ==. "Steffen"] [Asc UserCreated, LimitTo 1]
|
||||||
let addSupervisor = case theSupervisor of
|
let addSupervisor = case theSupervisor of
|
||||||
[s] -> \suid k -> case k of
|
[s] -> \suid k -> case k of
|
||||||
@ -83,17 +83,13 @@ fakeQualificationUsers (Entity qid Qualification{qualificationRefreshWithin}) (u
|
|||||||
fakeUser :: ([Text], UserSurname, (Maybe Languages, DateTimeFormat, DateTimeFormat, DateTimeFormat), Bool, Int) -> User
|
fakeUser :: ([Text], UserSurname, (Maybe Languages, DateTimeFormat, DateTimeFormat, DateTimeFormat), Bool, Int) -> User
|
||||||
fakeUser (firstNames, userSurname, (userLanguages, userDateTimeFormat, userDateFormat, userTimeFormat), userPrefersPostal, _isSupervised) =
|
fakeUser (firstNames, userSurname, (userLanguages, userDateTimeFormat, userDateFormat, userTimeFormat), userPrefersPostal, _isSupervised) =
|
||||||
let userIdent = CI.mk $ Text.intercalate "." (take 1 firstNames ++ (Text.take 1 <$> drop 1 firstNames) ++ [userSurname]) <> "@example.com"
|
let userIdent = CI.mk $ Text.intercalate "." (take 1 firstNames ++ (Text.take 1 <$> drop 1 firstNames) ++ [userSurname]) <> "@example.com"
|
||||||
|
userPasswordHash = Just pwSimple
|
||||||
|
userLastAuthentication = Nothing
|
||||||
userEmail = userIdent
|
userEmail = userIdent
|
||||||
userDisplayEmail = userIdent
|
userDisplayEmail = userIdent
|
||||||
userDisplayName = Text.unwords $ firstNames <> [userSurname]
|
userDisplayName = Text.unwords $ firstNames <> [userSurname]
|
||||||
userMatrikelnummer = Just "TESTUSER"
|
userMatrikelnummer = Just "TESTUSER"
|
||||||
userAuthentication = pwSimple
|
|
||||||
userLastAuthentication = Nothing
|
|
||||||
userCreated = now
|
userCreated = now
|
||||||
userLastLdapSynchronisation = Nothing
|
|
||||||
userLdapPrimaryKey = Nothing
|
|
||||||
userLastAzureSynchronisation = Nothing
|
|
||||||
userAzurePrimaryKey = Nothing
|
|
||||||
userTokensIssuedAfter = Nothing
|
userTokensIssuedAfter = Nothing
|
||||||
userFirstName = Text.unwords firstNames
|
userFirstName = Text.unwords firstNames
|
||||||
userTitle = Nothing
|
userTitle = Nothing
|
||||||
|
|||||||
Reference in New Issue
Block a user