Changeset b67fd22


Ignore:
Timestamp:
Dec 10, 2010 1:41:55 PM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
e65150a
Parents:
f4f036f
Message:

Remove abac credentials when the experiment is removed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    rf4f036f rb67fd22  
    10831083        """
    10841084
    1085         for p, a in attrs:
    1086             self.auth.unset_attribute(p, a)
    1087         self.auth.save()
    1088 
    10891085        if need_state_lock: self.state_lock.acquire()
    1090         self.state[expid]['auth'] = set()
     1086        if expid in self.state and 'auth' in self.state[expid]:
     1087            for p, a in self.state[expid]['auth']:
     1088                self.auth.unset_attribute(p, a)
     1089            self.state[expid]['auth'] = set()
    10911090        if self.state_filename: self.write_state()
    10921091        if need_state_lock: self.state_lock.release()
     1092        self.auth.save()
    10931093
    10941094
     
    11181118                if status and status == 'failed':
    11191119                    # remove the old access attributes
    1120                     self.clear_experiment_authorization(self.state[eid]['auth'],
     1120                    self.clear_experiment_authorization(eid,
    11211121                            need_state_lock=False)
    11221122                    overwrite = True
     
    23672367            self.state_lock.acquire()
    23682368            for id in ids:
     2369                self.clear_experiment_authorizaton(id, need_state_lock=False)
    23692370                if id in self.state: del self.state[id]
    23702371
Note: See TracChangeset for help on using the changeset viewer.