app/soc/views/models/request.py
changeset 876 0c1329d4b514
parent 858 e79e7a22326f
child 890 b3bf833c4580
--- a/app/soc/views/models/request.py	Wed Jan 21 16:12:31 2009 +0000
+++ b/app/soc/views/models/request.py	Wed Jan 21 16:12:48 2009 +0000
@@ -35,6 +35,7 @@
 from soc.views import helper
 from soc.views import out_of_band
 from soc.views.helper import access
+from soc.views.helper import decorators
 from soc.views.helper import redirects
 from soc.views.models import base
 
@@ -122,7 +123,8 @@
 
     super(View, self).__init__(params=params)
 
-
+  @decorators.merge_params
+  @decorators.check_access
   def listSelf(self, request, access_type,
                page_name=None, params=None, **kwargs):
     """Displays the unhandled requests for this user.
@@ -134,14 +136,6 @@
       kwargs: not used
     """
 
-    params = dicts.merge(params, self._params)
-    params['logic'] = self._logic
-
-    try:
-      access.checkAccess(access_type, request, params['rights'])
-    except out_of_band.Error, error:
-      return helper.responses.errorResponse(error, request)
-
     # get the current user
     properties = {'account': users.get_current_user()}
     user_entity = user_logic.logic.getForFields(properties, unique=True)