# HG changeset patch # User Sverre Rabbelier # Date 1235247291 0 # Node ID 8eec34007e803cf371900f2756af14ff8543ff58 # Parent e633906ed88d1ba89cd161399860cb0535b83671 Specify how to walk the scope up to another scope This will be used by document ACL later. Patch by: Sverre Rabbelier diff -r e633906ed88d -r 8eec34007e80 app/soc/views/helper/access.py --- a/app/soc/views/helper/access.py Sat Feb 21 20:14:19 2009 +0000 +++ b/app/soc/views/helper/access.py Sat Feb 21 20:14:51 2009 +0000 @@ -225,6 +225,14 @@ 'user_self': ('checkIsUserSelf', 'scope_path'), } + #: the depths of various scopes to other scopes + # the 0 entries are not used, and are for clarity purposes only + SCOPE_DEPTH = { + 'sponsor': (sponsor_logic, {'sponsor': 0}), + 'program': (program_logic, {'sponsor': 1, 'program': 0}), + 'org': (org_logic, {'sponsor': 2, 'program': 1, 'org': 0}), + } + def __init__(self, params): """Adopts base.rights as rights if base is set. """