def authorize(self, req):
try:<EOL><INDENT>version, account, container, obj = split_path(req.path, <NUM_LIT:1>, <NUM_LIT:4>, True)<EOL><DEDENT>except ValueError:<EOL><INDENT>return HTTPNotFound(request=req)<EOL><DEDENT>if not account or not account.startswith(self.reseller_prefix):<EOL><INDENT>return self.denied_response(req)<EOL><DEDENT>user_groups = (req.remote_user or '<STR_LIT>').split('<STR_LIT:U+002C>')<EOL>if '<STR_LIT>' in user_groups andaccount != self.reseller_prefix andaccount[len(self.reseller_prefix)] != '<STR_LIT:.>':<EOL><INDENT>req.environ['<STR_LIT>'] = True<EOL>return None<EOL><DEDENT>if account in user_groups and(req.method not in ('<STR_LIT>', '<STR_LIT>') or container):<EOL><INDENT>req.environ['<STR_LIT>'] = True<EOL>return None<EOL><DEDENT>if (req.environ.get('<STR_LIT>') and<EOL>req.environ['<STR_LIT>'] ==<EOL>req.headers.get('<STR_LIT>', None) and<EOL>'<STR_LIT>' in req.headers and<EOL>(req.remote_addr in self.allowed_sync_hosts or<EOL>get_remote_client(req) in self.allowed_sync_hosts)):<EOL><INDENT>return None<EOL><DEDENT>referrers, groups = parse_acl(getattr(req, '<STR_LIT>', None))<EOL>if referrer_allowed(req.referer, referrers):<EOL><INDENT>if obj or '<STR_LIT>' in groups:<EOL><INDENT>return None<EOL><DEDENT>return self.denied_response(req)<EOL><DEDENT>if not req.remote_user:<EOL><INDENT>return self.denied_response(req)<EOL><DEDENT>for user_group in user_groups:<EOL><INDENT>if user_group in groups:<EOL><INDENT>return None<EOL><DEDENT><DEDENT>return self.denied_response(req)<EOL>
Returns None if the request is authorized to continue or a standard
        WSGI response callable if not.