registration: updated flash with more information after user registered.

This commit is contained in:
Marcin Kuzminski 2019-11-12 15:18:42 +01:00
parent b3c6e232b9
commit 68785bf46b
2 changed files with 7 additions and 4 deletions

View file

@ -401,7 +401,7 @@ class TestLoginController(object):
) # This should be overridden
assert_session_flash(
response, 'You have successfully registered with RhodeCode')
response, 'You have successfully registered with RhodeCode. You can log-in now.')
ret = Session().query(User).filter(
User.username == 'test_regular4').one()

View file

@ -312,8 +312,6 @@ class LoginView(BaseAppView):
action_data = {'data': new_user.get_api_data(),
'user_agent': self.request.user_agent}
if external_identity:
action_data['external_identity'] = external_identity
@ -329,8 +327,13 @@ class LoginView(BaseAppView):
event = UserRegistered(user=new_user, session=self.session)
trigger(event)
h.flash(
_('You have successfully registered with RhodeCode'),
_('You have successfully registered with RhodeCode. You can log-in now.'),
category='success')
if external_identity:
h.flash(
_('Please use the {identity} button to log-in').format(
identity=external_identity),
category='success')
Session().commit()
redirect_ro = self.request.route_path('login')