Users can now change their email address.
parent
967d83e7e4
commit
51d8f07b9e
|
@ -347,7 +347,7 @@ render state
|
||||||
render_authd_admin_interface = HH.slot _admini unit AdminInterface.component unit AdministrationEvent
|
render_authd_admin_interface = HH.slot _admini unit AdminInterface.component unit AdministrationEvent
|
||||||
|
|
||||||
render_migration :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
render_migration :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
||||||
render_migration = HH.slot_ _mi unit MigrationInterface.component unit
|
render_migration = HH.slot _mi unit MigrationInterface.component unit MigrationInterfaceEvent
|
||||||
|
|
||||||
render_legal_notice :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
render_legal_notice :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
||||||
render_legal_notice
|
render_legal_notice
|
||||||
|
@ -689,6 +689,10 @@ handleAction = case _ of
|
||||||
case current_page of
|
case current_page of
|
||||||
Administration -> handleAction $ DispatchAuthDaemonMessage m
|
Administration -> handleAction $ DispatchAuthDaemonMessage m
|
||||||
_ -> pure unit
|
_ -> pure unit
|
||||||
|
(AuthD.GotNewEmailTokenSent _) -> do
|
||||||
|
handleAction $ Log $ SuccessLog "New email address is pending. Please enter validation token."
|
||||||
|
(AuthD.GotNewEmailAddressValidated _) -> do
|
||||||
|
handleAction $ Log $ SuccessLog "New email address has been validated."
|
||||||
(AuthD.GotErrorMustBeAuthenticated _) -> do
|
(AuthD.GotErrorMustBeAuthenticated _) -> do
|
||||||
handleAction $ Log $ ErrorLog "received a GotErrorMustBeAuthenticated message."
|
handleAction $ Log $ ErrorLog "received a GotErrorMustBeAuthenticated message."
|
||||||
handleAction $ AddNotif $ BadNotification "Sorry, you must be authenticated to perform this action."
|
handleAction $ AddNotif $ BadNotification "Sorry, you must be authenticated to perform this action."
|
||||||
|
@ -778,7 +782,7 @@ handleAction = case _ of
|
||||||
|
|
||||||
-- TODO
|
-- TODO
|
||||||
MigrationInterfaceEvent ev -> case ev of
|
MigrationInterfaceEvent ev -> case ev of
|
||||||
MigrationInterface.MessageToSend message -> H.tell _ws_dns unit (WS.ToSend message)
|
MigrationInterface.MessageToSend message -> H.tell _ws_auth unit (WS.ToSend message)
|
||||||
MigrationInterface.Log message -> handleAction $ Log message
|
MigrationInterface.Log message -> handleAction $ Log message
|
||||||
|
|
||||||
-- | Send a received authentication daemon message `AuthD.AnswerMessage` to a component.
|
-- | Send a received authentication daemon message `AuthD.AnswerMessage` to a component.
|
||||||
|
|
|
@ -281,6 +281,21 @@ type UserDeleted = { uid :: Int }
|
||||||
codecGotUserDeleted ∷ CA.JsonCodec UserDeleted
|
codecGotUserDeleted ∷ CA.JsonCodec UserDeleted
|
||||||
codecGotUserDeleted = CA.object "UserDeleted" (CAR.record { uid: CA.int })
|
codecGotUserDeleted = CA.object "UserDeleted" (CAR.record { uid: CA.int })
|
||||||
|
|
||||||
|
-- {- 13 -}
|
||||||
|
-- type Contacts = { TODO }
|
||||||
|
-- codecGotContacts ∷ CA.JsonCodec Contacts
|
||||||
|
-- codecGotContacts = CA.object "Contacts" (CAR.record { TODO })
|
||||||
|
|
||||||
|
{- 14 -}
|
||||||
|
type NewEmailTokenSent = {}
|
||||||
|
codecGotNewEmailTokenSent ∷ CA.JsonCodec NewEmailTokenSent
|
||||||
|
codecGotNewEmailTokenSent = CA.object "NewEmailTokenSent" (CAR.record {})
|
||||||
|
|
||||||
|
{- 15 -}
|
||||||
|
type NewEmailAddressValidated = {}
|
||||||
|
codecGotNewEmailAddressValidated ∷ CA.JsonCodec NewEmailAddressValidated
|
||||||
|
codecGotNewEmailAddressValidated = CA.object "NewEmailAddressValidated" (CAR.record {})
|
||||||
|
|
||||||
{- 20 -}
|
{- 20 -}
|
||||||
type ErrorMustBeAuthenticated = {}
|
type ErrorMustBeAuthenticated = {}
|
||||||
codecGotErrorMustBeAuthenticated :: CA.JsonCodec ErrorMustBeAuthenticated
|
codecGotErrorMustBeAuthenticated :: CA.JsonCodec ErrorMustBeAuthenticated
|
||||||
|
@ -413,6 +428,9 @@ data AnswerMessage
|
||||||
| GotPasswordRecovered PasswordRecovered -- 10
|
| GotPasswordRecovered PasswordRecovered -- 10
|
||||||
| GotMatchingUsers MatchingUsers -- 11
|
| GotMatchingUsers MatchingUsers -- 11
|
||||||
| GotUserDeleted UserDeleted -- 12
|
| GotUserDeleted UserDeleted -- 12
|
||||||
|
-- | GotContacts Contacts -- 13
|
||||||
|
| GotNewEmailTokenSent NewEmailTokenSent -- 14
|
||||||
|
| GotNewEmailAddressValidated NewEmailAddressValidated -- 15
|
||||||
| GotErrorMustBeAuthenticated ErrorMustBeAuthenticated -- 20
|
| GotErrorMustBeAuthenticated ErrorMustBeAuthenticated -- 20
|
||||||
| GotErrorAlreadyUsedLogin ErrorAlreadyUsedLogin -- 21
|
| GotErrorAlreadyUsedLogin ErrorAlreadyUsedLogin -- 21
|
||||||
| GotErrorMailRequired ErrorMailRequired -- 22
|
| GotErrorMailRequired ErrorMailRequired -- 22
|
||||||
|
@ -480,6 +498,9 @@ decode number string
|
||||||
10 -> error_management codecGotPasswordRecovered GotPasswordRecovered
|
10 -> error_management codecGotPasswordRecovered GotPasswordRecovered
|
||||||
11 -> error_management codecGotMatchingUsers GotMatchingUsers
|
11 -> error_management codecGotMatchingUsers GotMatchingUsers
|
||||||
12 -> error_management codecGotUserDeleted GotUserDeleted
|
12 -> error_management codecGotUserDeleted GotUserDeleted
|
||||||
|
-- 13 -> error_management codecGotContacts GotContacts
|
||||||
|
14 -> error_management codecGotNewEmailTokenSent GotNewEmailTokenSent
|
||||||
|
15 -> error_management codecGotNewEmailAddressValidated GotNewEmailAddressValidated
|
||||||
20 -> error_management codecGotErrorMustBeAuthenticated GotErrorMustBeAuthenticated
|
20 -> error_management codecGotErrorMustBeAuthenticated GotErrorMustBeAuthenticated
|
||||||
21 -> error_management codecGotErrorAlreadyUsedLogin GotErrorAlreadyUsedLogin
|
21 -> error_management codecGotErrorAlreadyUsedLogin GotErrorAlreadyUsedLogin
|
||||||
22 -> error_management codecGotErrorMailRequired GotErrorMailRequired
|
22 -> error_management codecGotErrorMailRequired GotErrorMailRequired
|
||||||
|
|
Loading…
Reference in New Issue