Index: main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- main/waeup.kofa/trunk/CHANGES.txt	(revision 17253)
+++ main/waeup.kofa/trunk/CHANGES.txt	(revision 17261)
@@ -4,4 +4,6 @@
 1.7.2.dev0 (unreleased)
 =======================
+
+* Specify the role in flash message after logging in.
 
 * Add `AccommodationViewer` role.
Index: main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 17253)
+++ main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 17261)
@@ -689,5 +689,5 @@
         self.browser.getControl("Login").click()
         self.assertTrue(
-            'You logged in.' in self.browser.contents)
+            'You logged in as an applicant.' in self.browser.contents)
 
     def test_maintenance_mode(self):
@@ -716,5 +716,5 @@
         self.login()
         self.assertTrue(
-            'You logged in.' in self.browser.contents)
+            'You logged in as an applicant.' in self.browser.contents)
         self.browser.open(self.edit_path)
         self.assertTrue(self.browser.url != self.login_path)
@@ -740,5 +740,5 @@
         self.login()
         self.assertTrue(
-            'You logged in.' in self.browser.contents)
+            'You logged in as an applicant.' in self.browser.contents)
         self.assertTrue(
             '<strong>Congratulations!</strong> You have been offered provisional'
@@ -2066,10 +2066,10 @@
             '\nmsg: Dear John Anthony Tester,'
             '\nmsg: '
-            '\nmsg: Your application app2020_<6-DIGITS> has been successfully submitted to Sample University.'
+            '\nmsg: Your application app%s_<6-DIGITS> has been successfully submitted to Sample University.'
             '\nmsg: '
             '\nmsg: Regards'
             '\nmsg: '
             % (session_1, session_1, session_2, mandate_id_0,
-               session_1, session_1, session_2, mandate_id_1,),
+               session_1, session_1, session_2, mandate_id_1, session_1),
             self.get_fake_smtp_output()
             )
Index: main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 17253)
+++ main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 17261)
@@ -366,6 +366,7 @@
         if SUBMIT is not None:
             if self.request.principal.id != 'zope.anybody':
-                self.flash(_('You logged in.'))
+                #self.flash(_('You logged in.'))
                 if self.request.principal.user_type == 'student':
+                    self.flash(_('You logged in as a student.'))
                     student = grok.getSite()['students'][
                         self.request.principal.id]
@@ -397,4 +398,5 @@
                     return
                 elif self.request.principal.user_type == 'applicant':
+                    self.flash(_('You logged in as an applicant.'))
                     container, application_number = self.request.principal.id.split('_')
                     rel_link = '/applicants/%s/%s' % (
@@ -406,16 +408,21 @@
                 site_roles = get_user_account(self.request).roles
                 if local_roles.has_key('waeup.local.Lecturer'):
+                    self.flash(_('You logged in as a lecturer.'))
                     self.redirect(self.application_url() + '/my_courses')
                     return
                 if local_roles.has_key('waeup.local.TranscriptOfficer') \
                     or 'waeup.TranscriptOfficer' in site_roles:
+                    self.flash(_('You logged in as a transcript officer.'))
                     self.redirect(self.application_url() + '/my_transcript_requests')
                     return
                 if local_roles.has_key('waeup.local.TranscriptSignee'):
+                    self.flash(_('You logged in as a transcript signee.'))
                     self.redirect(self.application_url() + '/my_transcript_signing_requests')
                     return
                 if not self.camefrom:
+                    self.flash(_('You logged in as an officer.'))
                     self.redirect(self.application_url() + '/index')
                     return
+                self.flash(_('You logged in as an officer.'))
                 self.redirect(self.camefrom)
                 return
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 17253)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 17261)
@@ -3287,5 +3287,5 @@
         self.browser.getControl("Login").click()
         self.assertTrue(
-            'You logged in.' in self.browser.contents)
+            'You logged in as a student.' in self.browser.contents)
         # Now students can add the current study level
         self.browser.getLink("Study Course").click()
@@ -4837,5 +4837,6 @@
         # lecturers can login and will be led to landing page.
         self.login_as_lecturer()
-        self.assertMatches('...You logged in...', self.browser.contents)
+        self.assertTrue(
+            'You logged in as a lecturer.' in self.browser.contents)
         self.assertEqual(self.browser.url, URL_LECTURER_LANDING)
         self.assertTrue(
@@ -5213,5 +5214,5 @@
         self.browser.getControl("Login").click()
         self.assertTrue(
-            'You logged in.' in self.browser.contents)
+            'You logged in as a student.' in self.browser.contents)
         self.assertTrue(
             '<a href="http://localhost/app/students/K1000000">Base Data</a>'
