diff options
author | mconway <michael.c.conway@gmail.com> | 2013-02-20 19:59:54 (GMT) |
---|---|---|
committer | mconway <michael.c.conway@gmail.com> | 2013-02-20 19:59:54 (GMT) |
commit | eb2bf6c1dabc4f8562c9f5a7bafb6a5134b51d5d (patch) | |
tree | 8f92f44493aceac00bdbc204108c5a20d76dbe88 | |
parent | 171d04b92eecceb3c15157b7b1867d17f7b9a3eb (diff) | |
download | QCG-Data-eb2bf6c1dabc4f8562c9f5a7bafb6a5134b51d5d.zip QCG-Data-eb2bf6c1dabc4f8562c9f5a7bafb6a5134b51d5d.tar.gz QCG-Data-eb2bf6c1dabc4f8562c9f5a7bafb6a5134b51d5d.tar.bz2 |
[#1220] shares in home page on servers w/o specific query still show errors
-rwxr-xr-x | idrop-web/grails-app/controllers/org/irods/mydrop/controller/HomeController.groovy | 36 | ||||
-rwxr-xr-x | idrop-web/grails-app/i18n/messages.properties | 1 | ||||
-rw-r--r-- | idrop-web/release_notes.txt | 3 |
3 files changed, 29 insertions, 11 deletions
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/HomeController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/HomeController.groovy index 362aa88..172e81a 100755 --- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/HomeController.groovy +++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/HomeController.groovy @@ -1,6 +1,7 @@ package org.irods.mydrop.controller import org.irods.jargon.core.connection.IRODSAccount +import org.irods.jargon.core.exception.SpecificQueryException import org.irods.jargon.core.pub.IRODSAccessObjectFactory import org.irods.jargon.core.utils.MiscIRODSUtils import org.irods.mydrop.service.SharingService @@ -118,11 +119,17 @@ class HomeController { return } - def listing = sharingService.listCollectionsSharedByMe(irodsAccount); - if (listing.isEmpty()) { - render(view:"noInfo") - } else { - render(view:"shareQuickViewList",model:[listing:listing]) + try { + def listing = sharingService.listCollectionsSharedByMe(irodsAccount); + if (listing.isEmpty()) { + render(view:"noInfo") + } else { + render(view:"shareQuickViewList",model:[listing:listing]) + } + } catch (SpecificQueryException e) { + log.error "speific query exception", e + def message = message(code:"error.no.specific.query") + response.sendError(500,message) } } @@ -140,13 +147,20 @@ class HomeController { return } - def listing = sharingService.listCollectionsSharedWithMe(irodsAccount) - - if (listing.isEmpty()) { - render(view:"noInfo") - } else { - render(view:"shareWithMeQuickViewList",model:[listing:listing]) + try { + def listing = sharingService.listCollectionsSharedWithMe(irodsAccount) + if (listing.isEmpty()) { + render(view:"noInfo") + } else { + render(view:"shareWithMeQuickViewList",model:[listing:listing]) + } + } catch (SpecificQueryException e) { + log.error "speific query exception", e + def message = message(code:"error.no.specific.query") + response.sendError(500,message) } + + } diff --git a/idrop-web/grails-app/i18n/messages.properties b/idrop-web/grails-app/i18n/messages.properties index 33ddfa1..ee447a1 100755 --- a/idrop-web/grails-app/i18n/messages.properties +++ b/idrop-web/grails-app/i18n/messages.properties @@ -198,6 +198,7 @@ error.duplicate.metadata=Metadata entry already exists error.dupicate.share=Duplicate share data, reload and try again error.file.not.found=The file was not found, please reload error.no.resource=No resource name provided +error.no.specific.query=This iRODS server does not support the queries needed for sharing. Contact the administrator if this functionality is expected error.passwords.dont.match=Confirm password not equal to password error.rename.to.self=File cannot be renamed to same name, ignored error.invalid.acl=Invalid ACL value {0} diff --git a/idrop-web/release_notes.txt b/idrop-web/release_notes.txt index 5c4f3c7..7e673bc 100644 --- a/idrop-web/release_notes.txt +++ b/idrop-web/release_notes.txt @@ -39,6 +39,9 @@ Note that the following bug and feature requests are logged in GForge with relat *[#1225] download link for data info broken
**Fix download link for data object info, now uses same javascript method as download button. Link would render funny with extended path info
+*[#1220] shares in home page on servers w/o specific query still show errors
+**Added new SpecificQueryException in jargon and tolerate this error in the show shares functions on the home page with a user friendly message
+
==Features==
*[#984] iDrop web '2.0' redesign effort
|