ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DIPAYAN BHOWMICK (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-14932) "download zip" does not work
Date Sun, 07 Feb 2016 17:02:39 GMT

    [ https://issues.apache.org/jira/browse/AMBARI-14932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15136319#comment-15136319
] 

DIPAYAN BHOWMICK commented on AMBARI-14932:
-------------------------------------------

[~patelket@us.ibm.com], 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'
property.

Hope this helps.
Thanks

> "download zip"  does not work
> -----------------------------
>
>                 Key: AMBARI-14932
>                 URL: https://issues.apache.org/jira/browse/AMBARI-14932
>             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:
> http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.0.0/bk_ambari_views_guide/bk_ambari_views_guide-20150721.pdf



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message