def download_unsigned(request, uuid, **kwargs):
 extension = get_object_or_404(Extension.objects.without_deleted(), uuid=uuid)
 version = get_object_or_404(extension.versions.without_deleted(), pk=kwargs['version_id'])
 def is_author():
  return extension.authors.filter(pk=request.user.pk).exists()
 def is_reviewer():
  return action_allowed(request, 'ContentTools', 'AddonReview')
 if (request.user.is_authenticated() and (is_author() or is_reviewer())):
  log.info(('Downloading unsigned add-on: %s version %s from %s' % (extension.pk, version.pk, version.file_path)))
  return _download(request, extension, version, version.file_path, public=False)
 else:
  raise PermissionDenied

def download_unsigned ( request , uuid , ** kwargs ) : extension = get_object_or_404 ( Extension . objects . without_deleted ( ) , uuid = uuid ) version = get_object_or_404 ( extension . versions . without_deleted ( ) , pk = kwargs [ 'version_id' ] ) def is_author ( ) : return extension . authors . filter ( pk = request . user . pk ) . exists ( ) def is_reviewer ( ) : return action_allowed ( request , 'ContentTools' , 'AddonReview' ) if ( request . user . is_authenticated ( ) and ( is_author ( ) or is_reviewer ( ) ) ) : log . info ( ( 'Downloading unsigned add-on: %s version %s from %s' % ( extension . pk , version . pk , version . file_path ) ) ) return _download ( request , extension , version , version . file_path , public = False ) else : raise PermissionDenied
download the unsigned archive for a given extension/version .