Beispiel #1
0
 def _action_allowed(self, action):
     if self.setup['decision'] == 'whitelist' and \
        not matches_white_list(action, self.setup['decision_list']):
         self.logger.info("In whitelist mode: suppressing Action:" + \
                          action.get('name'))
         return False
     if self.setup['decision'] == 'blacklist' and \
        not passes_black_list(action, self.setup['decision_list']):
         self.logger.info("In blacklist mode: suppressing Action:" + \
                          action.get('name'))
         return False
     return True
Beispiel #2
0
 def _action_allowed(self, action):
     if self.setup['decision'] == 'whitelist' and \
        not matches_white_list(action, self.setup['decision_list']):
         self.logger.info("In whitelist mode: suppressing Action:" + \
                          action.get('name'))
         return False
     if self.setup['decision'] == 'blacklist' and \
        not passes_black_list(action, self.setup['decision_list']):
         self.logger.info("In blacklist mode: suppressing Action:" + \
                          action.get('name'))
         return False
     return True
Beispiel #3
0
 def _action_allowed(self, action):
     """ Return true if the given action is allowed to be run by
     the whitelist or blacklist """
     if self.setup['decision'] == 'whitelist' and \
        not matches_white_list(action, self.setup['decision_list']):
         self.logger.info("In whitelist mode: suppressing Action: %s" %
                          action.get('name'))
         return False
     if self.setup['decision'] == 'blacklist' and \
        not passes_black_list(action, self.setup['decision_list']):
         self.logger.info("In blacklist mode: suppressing Action: %s" %
                          action.get('name'))
         return False
     return True