Changeset 260
- Timestamp:
- Jan 24, 2008, 9:32:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/cache_acls.py
r257 r260 36 36 transaction = ctx.current.create_transaction() 37 37 38 print repr(ctx), repr(ctx.current), repr(transaction)39 # Remove existing machine access entries40 machine_access_table.delete()41 ctx.current.flush()42 43 38 try: 44 39 machines = Machine.select() … … 48 43 people.update(expandName(m.administrator)) 49 44 print '%s: %s' % (m.name, ' '.join(people)) 50 for p in people: 45 old_people = set(a.user for a in m.acl) 46 for removed in old_people - people: 47 ma = [x for x in m.acl if x.user == removed][0] 48 ctx.current.delete(ma) 49 for p in people - old_people: 51 50 ma = MachineAccess(machine_id=m.machine_id, user=p) 52 51 ctx.current.save(ma)
Note: See TracChangeset
for help on using the changeset viewer.