Ignore:
Timestamp:
01/11/10 16:30:22 (10 years ago)
Author:
pjkersha
Message:

Working and tested version with functionality for adding custom attribute value types and functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/ndg_xacml/ndg/xacml/core/rule_combining_alg.py

    r7108 r7682  
    1010__contact__ = "Philip.Kershaw@stfc.ac.uk" 
    1111__revision__ = "$Id$" 
    12 from abc import ABCMeta, abstractmethod 
     12import logging 
     13log = logging.getLogger(__name__) 
     14 
     15from abc import abstractmethod 
    1316 
    1417from ndg.xacml.core.context.result import Decision 
     
    8689                atLeastOneError = True 
    8790     
    88                 if effect(rule) == Decision.DENY: 
     91                if rule.effect.value == Decision.DENY: 
    8992                    potentialDeny = True 
    9093                     
     
    130133             
    131134            if decision == Decision.PERMIT: 
     135                log.debug("Rule %r permits, returning overall permit decision", 
     136                          rule.id) 
    132137                return Decision.PERMIT 
    133138             
     
    144149         
    145150        if potentialPermit: 
     151            log.debug('Rule found with potential permit but it evaluates to ' 
     152                      'indeterminate, returning overall indeterminate decision') 
    146153            return Decision.INDETERMINATE 
    147154         
    148155        if atLeastOneDeny: 
     156            log.debug('At least one rule with a deny decision found, returning ' 
     157                      'overall deny decision') 
    149158            return Decision.DENY 
    150159         
    151160        if atLeastOneError: 
    152             return Decision.INDETERMINATE 
    153          
     161            log.debug('At least one rule with an error found, returning ' 
     162                      'overall indeterminate decision') 
     163            return Decision.INDETERMINATE 
     164         
     165        log.debug('No rules were applicable to the request, returning ' 
     166                  'overall not applicable decision') 
    154167        return Decision.NOT_APPLICABLE 
    155168 
Note: See TracChangeset for help on using the changeset viewer.