Index: /main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscodes.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscodes.py	(revision 5152)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscodes.py	(revision 5153)
@@ -354,4 +354,40 @@
         return results
 
+    def getAccessCode(self, ac_id):
+        """Get the AccessCode with ID ``ac_id`` or ``KeyError``.
+        """
+        for batchname in self.keys():
+            batch = self[batchname]
+            try:
+                return batch.getAccessCode(ac_id)
+            except KeyError:
+                continue
+        return None
+    
+    def disable(self, ac_id, user_id):
+        """Disable the AC with ID ``ac_id``.
+
+        ``user_id`` is the user ID of the user triggering the
+        process. Already disabled ACs are left untouched.
+        """
+        ac = self.getAccessCode(ac_id)
+        if ac is None:
+            return
+        ac.__parent__.disable(ac_id, user_id)
+        return
+
+    def enable(self, ac_id):
+        """(Re-)enable the AC with ID ``ac_id``.
+
+        This leaves the given AC in state ``unused``. Already enabled
+        ACs are left untouched.
+        """
+        ac = self.getAccessCode(ac_id)
+        if ac is None:
+            return
+        ac.__parent__.enable(ac_id)
+        return
+
+    
 class AccessCodePlugin(grok.GlobalUtility):
     grok.name('accesscodes')
