Changes between Version 22 and Version 23 of BluePrintAuthorization


Ignore:
Timestamp:
06/19/10 15:13:46 (14 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintAuthorization

    v22 v23  
    135135    else:   
    136136        # Option 1
    137         #restriction = db(table[name].like('%|%d|%' % role)).select()
     137        #restriction = db(db.auth_permission.table_name == tablename).select(db.auth_permission.group_id, limitby=(0, 1)).first().group_id
     138        #if restriction:
     139        #   authorised = False
     140        #   restrictions = re.split("\|", restriction)[1:-1]
     141            # Assume we generally have fewer restrictions than roles
     142        #   for restriction in restrictions:
     143        #        if restriction in roles:
     144        #            authorised = True
     145        #else:
     146        #    authorised = True
    138147        # Option 2
    139148        module, resource = tablename.split("_", 1)