#1166: download links on a search result shows timing out 'download files' window
for non-connected users
---------------------+------------------------------------------------------
Reporter: landry | Owner: geonetwork-devel@…
Type: defect | Status: new
Priority: major | Milestone: v2.9.0
Component: General | Version: v2.8.0RC2
Keywords: |
---------------------+------------------------------------------------------
Using 2.8.0rc2, the search result window shows 'download file' links to
non-connected users for attached file resources, even if the privileges to
download the files are not granted to non-connected users. This wasnt the
case with geosource 2.7.0, so dunno what changed since then.
Clicking those links when non connected brings a 'download files' extjs
widget, but it timeouts since in the backend file.prepare.download is
called, and this raises an OperationNotAllowedEx exception which is not
propagated correctly to the UI. When connected and the rights are granted,
it correctly shows a list of downloadable files to select.
{{{
2012-11-26 10:00:06,689 INFO [jeeves.service] - Dispatching :
prepare.file.download
2012-11-26 10:00:06,692 ERROR [jeeves.service] - Exception when executing
service
2012-11-26 10:00:06,692 ERROR [jeeves.service] - (C) Exc :
OperationNotAllowedEx : Operation not allowed
2012-11-26 10:00:06,693 DEBUG [jeeves.service] - Raised exception while
executing service
<error id="operation-not-allowed">
<message>Operation not allowed</message>
<class>OperationNotAllowedEx</class>
<stack>
<at class="org.fao.geonet.lib.ResourceLib" file="ResourceLib.java"
line="131" method="checkPrivilege" />
<at class="org.fao.geonet.services.metadata.PrepareFileDownload"
file="PrepareFileDownload.java" line="94" method="exec" />
<at class="jeeves.server.dispatchers.ServiceInfo"
file="ServiceInfo.java" line="230" method="execService" />
<at class="jeeves.server.dispatchers.ServiceInfo"
file="ServiceInfo.java" line="139" method="execServices" />
<at class="jeeves.server.dispatchers.ServiceManager"
file="ServiceManager.java" line="420" method="dispatch" />
<at class="jeeves.server.JeevesEngine" file="JeevesEngine.java"
line="747" method="dispatch" />
<at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="208" method="execute" />
<at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="109" method="doGet" />
<at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="617" method="service" />
<at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="717" method="service" />
<skip>...</skip>
<at class="org.fao.geonet.monitor.webapp.WebappMetricsFilter"
file="WebappMetricsFilter.java" line="96" method="doFilter" />
<skip>...</skip>
<at
class="org.fao.geonet.monitor.webapp.MetricsRegistryInitializerFilter"
file="MetricsRegistryInitializerFilter.java" line="31" method="doFilter"
/>
<skip>...</skip>
</stack>
<request>
<language>fre</language>
<service>prepare.file.download</service>
</request>
</error>
}}}
So, two things:
- why are the download links shown at all to non-connected users ? smth
changed in the config ? In both cases i'm using resources.get for file
access
- can the exception be properly shown to the user instead of leaving the
user with a timing-out widget ?
(and of course, anyone can reproduce it ?)
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1166>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.