Index: /main/waeup.kofa/trunk/src/waeup/kofa/mandates/mandate.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/mandates/mandate.py	(revision 13987)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/mandates/mandate.py	(revision 13988)
@@ -79,2 +79,18 @@
         del self.__parent__[self.mandate_id]
         return msg, redirect_path
+
+class RefereeReportMandate(Mandate):
+    """This is a mandate which can unlock a `RefereeReportAddFormPage`.
+    The mandate is not automatically deleted. This has to be done
+    by the submit method of the add form page.
+    """
+
+    def execute(self):
+        if self.expires < datetime.utcnow():
+            return _('Mandate expired.'), ''
+        redirect_path = self.params.get('redirect_path', None)
+        name = self.params.get('name', None)
+        email = self.params.get('email', None)
+        if None in (redirect_path, name, email):
+            return _('Wrong mandate parameters.'), ''
+        return None, redirect_path
Index: /main/waeup.kofa/trunk/src/waeup/kofa/mandates/tests.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/mandates/tests.py	(revision 13987)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/mandates/tests.py	(revision 13988)
@@ -32,5 +32,5 @@
     IMandatesContainer, IMandate)
 from waeup.kofa.mandates.container import MandatesContainer
-from waeup.kofa.mandates.mandate import PasswordMandate
+from waeup.kofa.mandates.mandate import PasswordMandate, RefereeReportMandate
 from waeup.kofa.testing import (FunctionalLayer, FunctionalTestCase)
 
@@ -191,7 +191,6 @@
         self.assertTrue('1 mandate(s) were purged' in self.browser.contents)
         self.assertEqual(self.app['mandates'].count, (1, 0, 1))
-        return
-
-    def test_browser(self):
+
+    def test_browser_set_password(self):
         student = createObject('waeup.Student')
         self.app['students'].addStudent(student)
@@ -219,3 +218,29 @@
         self.assertTrue('Misuse' in self.browser.contents)
         self.assertEqual(self.browser.url, 'http://localhost/app/')
-        return
+
+    def test_refereereport_mandate(self):
+        mandate = RefereeReportMandate()
+        mandate.params['name'] = u'John Referee'
+        mandate.params['email'] = 'aa@aa.aa'
+        mandate.params['redirect_path'] = 'applicants/87689'
+        self.app['mandates'].addMandate(mandate)
+        (msg, redirect_path) = mandate.execute()
+        self.assertEqual(msg, None)
+        self.assertEqual(redirect_path, 'applicants/87689')
+        # Mandate has not been deleted
+        self.assertEqual(len(self.app['mandates'].keys()), 1)
+        mandate.params['redirect_path'] = None
+        (msg, redirect_path) = mandate.execute()
+        self.assertEqual(msg, 'Wrong mandate parameters.')
+        self.assertEqual(redirect_path, '')
+        # Add and execute an expired mandate
+        mandate2 = RefereeReportMandate(days=0)
+        mandate2.params['name'] = u'John Referee'
+        mandate2.params['email'] = 'aa@aa.aa'
+        mandate2.params['redirect_path'] = 'applicants/87689'
+        self.app['mandates'].addMandate(mandate2)
+        (msg, redirect_path) = mandate2.execute()
+        self.assertEqual(msg, 'Mandate expired.')
+        self.assertEqual(redirect_path, '')
+        # Both mandates still exist
+        self.assertEqual(len(self.app['mandates'].keys()), 2)
