Index: trunk/web/cache_acls.py
===================================================================
--- trunk/web/cache_acls.py	(revision 258)
+++ trunk/web/cache_acls.py	(revision 260)
@@ -36,9 +36,4 @@
     transaction = ctx.current.create_transaction()
 
-    print repr(ctx), repr(ctx.current), repr(transaction)
-    # Remove existing machine access entries
-    machine_access_table.delete()
-    ctx.current.flush()
-
     try:
         machines = Machine.select()
@@ -48,5 +43,9 @@
             people.update(expandName(m.administrator))
             print '%s: %s' % (m.name, ' '.join(people))
-            for p in people:
+            old_people = set(a.user for a in m.acl)
+            for removed in old_people - people:
+                ma = [x for x in m.acl if x.user == removed][0]
+                ctx.current.delete(ma)
+            for p in people - old_people:
                 ma = MachineAccess(machine_id=m.machine_id, user=p)
                 ctx.current.save(ma)
