Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/authentication.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/authentication.py	(revision 12188)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/authentication.py	(revision 12189)
@@ -40,4 +40,5 @@
     IBatchProcessor, IGNORE_MARKER, IFailedLoginInfo)
 from waeup.ikoba.utils.batching import BatchProcessor
+from waeup.ikoba.permissions import get_all_roles
 
 def setup_authentication(pau):
@@ -513,4 +514,19 @@
         return
 
+    def checkConversion(self, row, mode='ignore'):
+        """Validates all values in row.
+        """
+        errs, inv_errs, conv_dict = super(
+            UserProcessor, self).checkConversion(row, mode=mode)
+        # We need to check if roles exist.
+        roles = row.get('roles', None)
+        all_roles = [i[0] for i in get_all_roles()]
+        if roles not in ('', IGNORE_MARKER):
+            evalvalue = eval(roles)
+            for role in evalvalue:
+                if role not in all_roles:
+                    errs.append(('roles','invalid role'))
+        return errs, inv_errs, conv_dict
+
 class UsersPlugin(grok.GlobalUtility):
     """A plugin that updates users.
Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/browser/batchprocessing.txt
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/browser/batchprocessing.txt	(revision 12188)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/browser/batchprocessing.txt	(revision 12189)
@@ -147,4 +147,5 @@
     ... isouaba,Issoufou Abba Moussa,Chief Developer,isouaba@abc.de,+49-234-567,[]
     ... henrik,Henrik Bettermann,Admin,henrik@abc.de,+49-234-567,"['waeup.PortalManager', 'waeup.ImportManager']"
+    ... anne,Anne Palina,,anne@abc.de,+49-234-567,"['waeup.Nonsense']"
     ... """)
 
@@ -188,10 +189,10 @@
     >>> browser.getControl('Perform import').click()
 
-One line could not be imported:
+Two lines could not be imported:
 
     >>> print browser.contents
     <!DOCTYPE html PUBLIC...
     ...
-    ...Processing of 1 rows failed...
+    ...Processing of 2 rows failed...
     ...Successfully processed 1 rows...
     ...
@@ -204,4 +205,5 @@
     name,roles,title,public_name,phone,email,--ERRORS--
     henrik,"['waeup.PortalManager', 'waeup.ImportManager']",Henrik Bettermann,Admin,+49-234-567,henrik@abc.de,This object already exists. Skipping.
+    anne,['waeup.Nonsense'],Anne Palina,,+49-234-567,anne@abc.de,roles: invalid role
 
     >>> finished_file = dc_path + '/finished/newusers_zope.mgr.create.finished.csv'
@@ -218,7 +220,6 @@
 -----------------------
 
-We 'edit' the pending file (setting code to ``FAC5`` and title
-appropriately, and removing the --ERROR-- column) and finish the
-import this way:
+We 'edit' the pending file by removing anne and replacing henrik by gbenga 
+and finish the import this way:
 
     >>> open(dc_path + '/newusers_zope.mgr.create.pending.csv', 'wb').write(
