<% args.verb == 'GetRepositoryGroups' or \ remoteHost() in ['127.0.0.1', 'localhost'] or \ requireValidUser('saharaget') import time, rfc822 later = time.time() + (60 * 60 * 12) now = time.time() req.headers_out['Expires'] = rfc822.formatdate(later) req.headers_out['Last-modified'] = rfc822.formatdate(now) errorCode = '' verb = args.verb domain = asxml(url('/' + args.domainId + '.domain')).domain if args.domainId != domain.id: errorCode = 'badDomain' verbs={ 'GetRepositories':'/getRepositories', 'GetRepositoryGroups':'/getRepositoryGroups', 'GetRepository':'/getRepository', 'GetMapping':'/getMapping', 'GetTarget':'/getTarget', 'GetIdentifiers':'/getIdentifiers', 'GetRecord':'/getRecord', 'GetStatus':'/getStatus'} template = verbs.get(str(verb), False) if not template: errorCode = 'badVerb' if not errorCode: include(template) else: include(uri(path='/saharageterror', query={'errorCode':errorCode})) %>