# HG changeset patch # User Lennard de Rijk # Date 1232874623 0 # Node ID 2f86cbc90b659a0b075ffd170662aaf7420508eb # Parent f9c2b32b9e2b1a3f66bc949f3df152f770c75e96 Removed unused method from access.py. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed diff -r f9c2b32b9e2b -r 2f86cbc90b65 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.