Changes between Version 36 and Version 37 of BluePrintAuthorization


Ignore:
Timestamp:
06/19/10 17:33:29 (14 years ago)
Author:
Fran Boon
Comment:

Handle anonymous & int(str)

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintAuthorization

    v36 v37  
    142142            # Assume we generally have fewer restrictions than roles
    143143        #   for restriction in restrictions:
    144         #        if restriction in roles:
     144        #        if restriction == "0" or int(restriction) in roles:
     145                     # restriction 0 is anonymous
    145146        #            authorised = True
    146147        #else:
     
    159160            # Assume we generally have fewer restrictions than roles
    160161            for restriction in restrictions:
    161                 if restriction in roles:
     162                if restriction == "0" or int(restriction) in roles:
     163                    # restriction 0 is anonymous
    162164                    authorised = True
    163165               
     
    198200                    # Assume we generally have fewer restrictions than roles
    199201                    for restriction in restrictions:
    200                         if restriction in roles:
     202                        if restriction == "0" or int(restriction) in roles:
     203                            # restriction 0 is anonymous
    201204                            authorised = True
    202205