ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keta Patel <>
Subject Review Request 43508: "download zip" does not work
Date Fri, 12 Feb 2016 00:38:38 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for Ambari, Di Li and Srimanth Gunturi.

Bugs: AMBARI-14932

Repository: ambari


Steps to Reproduce:
1. go to "View" - "FILES" - " Create Instance"
2. go to hdfs file view
3. click "download zip" icon
The click doesn't download any file. The REST call returns 200 OK status.

Detailed steps on configuring Views can be found in the link below:


  contrib/views/files/src/main/resources/ui/app/controllers/file.js 88fa5fb 



The check for "allowed" in the controller, from the response of zipByRequestId() ("/zip" API
call for downloading zip file) resulted in no action after clicking the download zip button.
This was because there was no "allowed" paramter in the response of zip download. This "allowed"
property was added in the response of browse() ("/browse" API call for downloading individual
file) to check if the user had permissions for the file or not. This was verified by opening
the file. If that operation didn't throw an error, then it would mean that the user had the
required permissions to download the individual file. But the fact that the point of execution
reaches past the statement of opening the file verifies that the user has the permission.
The check with "checkperm" and setting the response with "allowed" attribute in the response
is not necessary. 
So, for the fix I simply removed the check for "allowed" from the controller and also removed
the check for "checkperm" which sets the "allowed" attribute in the response.

There are already exisitng tests for DownloadService, so I haven't added any new ones.


Keta Patel

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message