ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] [Commented] (AMBARI-14932) "download zip" does not work
Date Sun, 07 Feb 2016 17:02:39 GMT


DIPAYAN BHOWMICK commented on AMBARI-14932:

[], please find the details below:

Q1> What is the purpose of setting "allowed" to true in the response if we always pass
"checkperm" as true?
This was done to check if the user has permission, to open the file. This was to show an error
message in the UI during the download of a file, if the user does not have permission to read
the file. So, in the XHR request, if both download and checkperm is set to true, checkperm
will be considered.  If the user does not have permission and checkperm is true in the query
param, open call will throw AccessControlException and the call will be rejected. So, if checkperm
is true and the user has permission to open the file, 'allowed' will always be set to true.

Q2> Should the issue of handling "zip" and "concat" APIs involve change with the Response
having "allowed" property or changing the condition in "downloadFile" function of the controller
before calling the API?
zip and concat now ignores files for which the user does not have permission. So, the checkperm
call is not required for zip and concat.
Q3> We are calling "linkFor" 2 times in the "downloadFile" of the controller. Why is this
double call required? Can't we use the same link saved from the earlier call instead of calling
"linkFor" again?
Double call is made to linkFor but once it is made with checkperm true and second time it
is made with checkperm false(default). XHR call is actually made for the link returned by
the first call and the value returned by the second call is used to set the 'window.location.href'

Hope this helps.

> "download zip"  does not work
> -----------------------------
>                 Key: AMBARI-14932
>                 URL:
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-views, contrib
>    Affects Versions: trunk
>            Reporter: Keta Patel
>            Assignee: Keta Patel
>         Attachments: DownloadService.tiff, adapter.tiff, file_1.tiff, file_2.tiff, screenshot.tiff
> 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:

This message was sent by Atlassian JIRA

View raw message