Changes between Version 62 and Version 63 of BluePrintAuthorization


Ignore:
Timestamp:
06/19/10 23:02:36 (14 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintAuthorization

    v62 v63  
    7171  * doesn't support OR, doesn't support NOT
    7272  * 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{{{
     75def 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}}}
    7481 * Developer can put in additional manual restrictions or alternate routes, as-required
    7582