Removed unused method from access.py.
authorLennard de Rijk <ljvderijk@gmail.com>
Sun, 25 Jan 2009 09:10:23 +0000
changeset 974 2f86cbc90b65
parent 973 f9c2b32b9e2b
child 975 295d67509412
Removed unused method from access.py. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/views/helper/access.py
--- a/app/soc/views/helper/access.py	Sun Jan 25 00:04:11 2009 +0000
+++ b/app/soc/views/helper/access.py	Sun Jan 25 09:10:23 2009 +0000
@@ -610,42 +610,6 @@
   return wrapper
 
 
-def checkCanInvite(kwargs):
-  """Checks to see if the current user can create an invite.
-
-  Note that if the current url is not in the default 'request' form
-  this method either deny()s or performs the wrong access check.
-
-  Args:
-    request: a Django HTTP request
-  """
-
-  try:
-    # if the current user is a developer we allow access
-    checkIsDeveloper(kwargs)
-    return
-  except out_of_band.Error:
-    pass
-
-  # Construct a new url by reshufling the kwargs
-  order = ['role', 'access_type', 'scope_path', 'link_id']
-  url_params = dicts.unzip(kwargs, order)
-  url = '/'.join([''] + list(url_params))
-
-  # Mine the reshufled url
-  try:
-    callback, args, kwargs = urlresolvers.resolve(url)
-  except Exception:
-    deny(kwargs)
-
-  # Get the everything we need for the access check
-  params = callback.im_self.getParams()
-  access_type = kwargs['access_type']
-
-  # Perform the access check
-  checkAccess(access_type, rights=params['rights'], kwargs=kwargs)
-
-
 def checkHasPickGetArgs(kwargs):
   """Raises an alternate HTTP response if the request misses get args.