Changes between Version 62 and Version 63 of BluePrintAuthorization
- Timestamp:
- 06/19/10 23:02:36 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BluePrintAuthorization
v62 v63 71 71 * doesn't support OR, doesn't support NOT 72 72 * not efficient now we have {{{session.s3.roles}}} 73 * We need to write a function which handles OR & NOT: {{{shn_role_check(1, 2, not=(3))}}} 73 * We need a function which efficiently handles OR, AND & NOT. With roles cached in session, this should be easy: 74 {{{ 75 def myfunction(): 76 roles = session.s3.roles 77 if not 1 in roles or (2 in roles and 3 in roles) and not 4 in roles: 78 # redirect out 79 ... 80 }}} 74 81 * Developer can put in additional manual restrictions or alternate routes, as-required 75 82