Index: main/waeup.kofa/trunk/src/waeup/kofa/university/batching.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/university/batching.py	(revision 8993)
+++ main/waeup.kofa/trunk/src/waeup/kofa/university/batching.py	(revision 8994)
@@ -33,4 +33,5 @@
     IFacultiesContainer, IFaculty, ICourse, IDepartment, ICertificate,
     ICertificateCourse)
+from waeup.kofa.university.faculty import Faculty
 from waeup.kofa.utils.batching import BatchProcessor
 
@@ -46,4 +47,5 @@
     name = u'Faculty Processor'
     iface = IFaculty
+    allowed_roles = Faculty.local_roles
 
     location_fields = ['code',]
@@ -55,4 +57,10 @@
         return 'faculties' in site.keys()
 
+    @property
+    def available_fields(self):
+        fields = getFields(self.iface)
+        return sorted(list(set(
+            ['local_roles'] + fields.keys())))
+
     def entryExists(self, row, site):
         return row['code'] in site['faculties'].keys()
@@ -76,4 +84,37 @@
         del parent[row['code']]
         pass
+
+    def checkConversion(self, row, mode='create'):
+        """Validates all values in row.
+        """
+        errs, inv_errs, conv_dict =  super(
+            FacultyProcessor, self).checkConversion(row, mode=mode)
+        if row.has_key('local_roles'):
+            try:
+                local_roles = eval(row['local_roles'])
+            except:
+                errs.append(('local_roles','Error'))
+                return errs, inv_errs, conv_dict
+            if not isinstance(local_roles, list):
+                errs.append(('local_roles','no list'))
+                return errs, inv_errs, conv_dict
+            for rolemap in local_roles:
+                if not isinstance(rolemap, dict):
+                    errs.append(('local_roles','no dicts'))
+                    return errs, inv_errs, conv_dict
+                if not 'user_name' in rolemap.keys() or not \
+                    'local_role' in rolemap.keys():
+                    errs.append(('local_roles','user_name or local_role missing'))
+                    return errs, inv_errs, conv_dict
+                local_role = rolemap['local_role']
+                if not local_role in self.allowed_roles:
+                    errs.append(('local_roles','%s not allowed' % local_role))
+                    return errs, inv_errs, conv_dict
+                user = rolemap['user_name']
+                users = grok.getSite()['users']
+                if not user in users.keys():
+                    errs.append(('local_roles','%s does not exist' % user))
+                    return errs, inv_errs, conv_dict
+        return errs, inv_errs, conv_dict
 
 class DepartmentProcessor(BatchProcessor):
Index: main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_batching.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_batching.py	(revision 8993)
+++ main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_batching.py	(revision 8994)
@@ -19,8 +19,11 @@
 # Tests for university related batching
 import unittest
-
+import tempfile
+import shutil
+from zope.component.hooks import setSite, clearSite
 from zope.interface.verify import verifyClass, verifyObject
 from waeup.kofa.interfaces import IBatchProcessor
 from waeup.kofa.testing import FunctionalTestCase, FunctionalLayer
+from waeup.kofa.app import University
 from waeup.kofa.university.batching import (
     FacultyProcessor, DepartmentProcessor, CourseProcessor,
@@ -29,13 +32,34 @@
 from waeup.kofa.university.course import Course
 from waeup.kofa.university.department import Department
-
-
-class TestFacultyProcessor(unittest.TestCase):
+from waeup.kofa.university.batching import FacultyProcessor
+
+
+class TestFacultyProcessor(FunctionalTestCase):
+
+    layer = FunctionalLayer
 
     def setUp(self):
+        super(TestFacultyProcessor, self).setUp()
+        self.dc_root = tempfile.mkdtemp()
+        self.workdir = tempfile.mkdtemp()
+        app = University()
+        self.getRootFolder()['app'] = app
+        self.app = self.getRootFolder()['app']
+        setSite(app)
+
+        self.app['users'].addUser('bob', 'bobssecret')
+
         self.proc = FacultyProcessor()
         self.site1 = dict(faculties=dict())
         self.site2 = dict(faculties=dict(FAC='pseudo faculty'))
         self.row = dict(code='FAC')
+        self.processor = FacultyProcessor()
+        return
+
+    def tearDown(self):
+        super(TestFacultyProcessor, self).tearDown()
+        shutil.rmtree(self.workdir)
+        shutil.rmtree(self.dc_root)
+        clearSite()
         return
 
@@ -58,4 +82,65 @@
         self.proc.delEntry(self.row, self.site2)
         self.assertTrue('FAC' not in self.site2.keys())
+        return
+
+    def test_checkConversion(self):
+        # Make sure we can check conversions.
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(faculty_code='ABC', local_roles='[]'))
+        self.assertEqual(len(errs),0)
+
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(faculty_code='ABC',
+            local_roles="['nonsense'"
+            ))
+        self.assertEqual(len(errs),1)
+        self.assertEqual(errs, [('local_roles', 'Error')])
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(faculty_code='ABC',
+            local_roles="('abc')"
+            ))
+        self.assertEqual(len(errs),1)
+        self.assertEqual(errs, [('local_roles', 'no list')])
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(faculty_code='ABC',
+            local_roles="[('ABC')]"
+            ))
+        self.assertEqual(len(errs),1)
+        self.assertEqual(errs, [('local_roles', 'no dicts')])
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(faculty_code='ABC',
+            local_roles="('abc')"
+            ))
+        self.assertEqual(len(errs),1)
+        self.assertEqual(errs, [('local_roles', 'no list')])
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(faculty_code='ABC', local_roles=
+            "[{'name':'bob','local_role':'waeup.local.DepartmentManager'},]"
+            ))
+        self.assertEqual(len(errs),1)
+        self.assertEqual(errs, [('local_roles', 'user_name or local_role missing')])
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(faculty_code='ABC', local_roles=
+            "[{'user_name':'bob','localrole':'waeup.local.DepartmentManager'},]"
+            ))
+        self.assertEqual(len(errs),1)
+        self.assertEqual(errs, [('local_roles', 'user_name or local_role missing')])
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(faculty_code='ABC', local_roles=
+            "[{'user_name':'bob','local_role':'waeup.local.Boss'},]"
+            ))
+        self.assertEqual(len(errs),1)
+        self.assertEqual(errs, [('local_roles', 'waeup.local.Boss not allowed')])
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(faculty_code='ABC', local_roles=
+            "[{'user_name':'john','local_role':'waeup.local.DepartmentManager'},]"
+            ))
+        self.assertEqual(len(errs),1)
+        self.assertEqual(errs, [('local_roles', 'john does not exist')])
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(faculty_code='ABC', local_roles=
+            "[{'user_name':'bob','local_role':'waeup.local.DepartmentManager'},]"
+            ))
+        self.assertEqual(len(errs),0)
         return
 
