app/soc/views/helper/decorators.py
changeset 906 275d2f457c50
parent 873 cbb1d15ffe91
child 972 43018f61b481
equal deleted inserted replaced
905:70eb2493a346 906:275d2f457c50
    56 
    56 
    57   return view_wrapper
    57   return view_wrapper
    58 
    58 
    59 
    59 
    60 def merge_params(func):
    60 def merge_params(func):
    61   """Decorator that merges 'params' with self._params
    61   """Decorator that merges 'params' with self._params.
    62   """
    62   """
    63 
    63 
    64   @wraps(func)
    64   @wraps(func)
    65   def wrapper(self, *args, **kwargs):
    65   def wrapper(self, *args, **kwargs):
    66     params = kwargs.get('params', {})
    66     params = kwargs.get('params', {})
    69 
    69 
    70   return wrapper
    70   return wrapper
    71 
    71 
    72 
    72 
    73 def check_access(func):
    73 def check_access(func):
    74   """This decorator does access checks for the specified view method
    74   """This decorator does access checks for the specified view method.
    75 
    75 
    76   The rights dictionary is extracted from 'params', or, if either 'params' or
    76   The rights dictionary is extracted from 'params', or, if either 'params' or
    77   'rights' do not exist, from self._params['rights'].
    77   'rights' do not exist, from self._params['rights'].
    78   """
    78   """
    79 
    79