274 for i, spec in self.archive_specs.iteritems(): |
274 for i, spec in self.archive_specs.iteritems(): |
275 if i in allowed or self.configbool("web", "allow" + i): |
275 if i in allowed or self.configbool("web", "allow" + i): |
276 yield {"type" : i, "extension" : spec[2], "node" : nodeid} |
276 yield {"type" : i, "extension" : spec[2], "node" : nodeid} |
277 |
277 |
278 archive_specs = { |
278 archive_specs = { |
279 'bz2': ('application/x-tar', 'tbz2', '.tar.bz2', None), |
279 'bz2': ('application/x-bzip2', 'tbz2', '.tar.bz2', None), |
280 'gz': ('application/x-tar', 'tgz', '.tar.gz', None), |
280 'gz': ('application/x-gzip', 'tgz', '.tar.gz', None), |
281 'zip': ('application/zip', 'zip', '.zip', None), |
281 'zip': ('application/zip', 'zip', '.zip', None), |
282 } |
282 } |
283 |
283 |
284 def check_perm(self, req, op): |
284 def check_perm(self, req, op): |
285 for hook in permhooks: |
285 for hook in permhooks: |