Changes between Version 22 and Version 23 of BluePrintAuthorization
- Timestamp:
- 06/19/10 15:13:46 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BluePrintAuthorization
v22 v23 135 135 else: 136 136 # 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 138 147 # Option 2 139 148 module, resource = tablename.split("_", 1)