app/soc/views/helper/access.py
changeset 931 1131884c3c56
parent 927 f790f77ba6b7
child 940 a40056afef83
--- a/app/soc/views/helper/access.py	Fri Jan 23 17:51:35 2009 +0000
+++ b/app/soc/views/helper/access.py	Fri Jan 23 21:04:45 2009 +0000
@@ -680,6 +680,27 @@
   checkAccess(access_type, request, rights=params['rights'])
 
 
+def checkHasPickGetArgs(request, arg, kwargs):
+  """Raises an alternate HTTP response if the request misses get args
+
+  Args:
+    request: a Django HTTP request
+
+  Raises:
+    AccessViolationResponse:
+    * if continue is not in request.GET
+    * if field is not in request.GET
+  """
+
+  get_args = request.GET
+
+  if 'continue' in get_args and 'field' in get_args:
+    return
+
+  #TODO(SRabbelier) inform user that return_url and field are required
+  deny(request, arg, kwargs)
+
+
 def checkIsDocumentPublic(request, args, kwargs):
   """Checks whether a document is public.