summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/Version.java2
-rw-r--r--idrop-swing/pom.xml5
-rw-r--r--idrop-web/grails-app/controllers/org/irods/mydrop/controller/AuditController.groovy33
-rw-r--r--idrop-web/grails-app/i18n/messages.properties3
-rw-r--r--idrop-web/grails-app/views/audit/auditNoAccess.gsp1
-rw-r--r--pom.xml6
6 files changed, 24 insertions, 26 deletions
diff --git a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/Version.java b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/Version.java
index 55d2ce7..6a0e49c 100644
--- a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/Version.java
+++ b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/Version.java
@@ -1,4 +1,4 @@
package org.irods.jargon.idrop.lite;
public final class Version {
- public static String VERSION="20120626-1055";
+ public static String VERSION="20120630-0852";
}
diff --git a/idrop-swing/pom.xml b/idrop-swing/pom.xml
index 4a01108..4d43328 100644
--- a/idrop-swing/pom.xml
+++ b/idrop-swing/pom.xml
@@ -28,11 +28,6 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>org.irods.jargon</groupId>
- <artifactId>jargon-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>compile</scope>
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/AuditController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/AuditController.groovy
index 4655f06..7a97fe9 100644
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/AuditController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/AuditController.groovy
@@ -1,6 +1,7 @@
package org.irods.mydrop.controller
import org.irods.jargon.core.connection.IRODSAccount
+import org.irods.jargon.core.exception.CatNoAccessException
import org.irods.jargon.core.exception.DataNotFoundException
import org.irods.jargon.core.pub.CollectionAndDataObjectListAndSearchAO
import org.irods.jargon.core.pub.CollectionAuditAO
@@ -101,20 +102,26 @@ class AuditController {
def retObj = collectionAndDataObjectListAndSearchAO.getFullObjectForType(absPath)
def isDataObject = retObj instanceof DataObject
- def auditedActions
- if (isDataObject) {
- log.info("is a data object, get audit for it")
- DataObjectAuditAO dataObjectAuditAO = irodsAccessObjectFactory.getDataObjectAuditAO(irodsAccount)
- IRODSFile dataObjectFile = irodsAccessObjectFactory.getIRODSFileFactory(irodsAccount).instanceIRODSFile(absPath)
- auditedActions = dataObjectAuditAO.findAllAuditRecordsForDataObject(dataObjectFile, 0, 1000)
- } else {
- log.info("is a collection, get audit info for it")
- CollectionAuditAO collectionAuditAO = irodsAccessObjectFactory.getCollectionAuditAO(irodsAccount)
- IRODSFile dataObjectFile = irodsAccessObjectFactory.getIRODSFileFactory(irodsAccount).instanceIRODSFile(absPath)
- auditedActions = collectionAuditAO.findAllAuditRecordsForCollection(dataObjectFile, 0, 1000)
- }
+ try {
+ def auditedActions
+ if (isDataObject) {
+ log.info("is a data object, get audit for it")
+ DataObjectAuditAO dataObjectAuditAO = irodsAccessObjectFactory.getDataObjectAuditAO(irodsAccount)
+ IRODSFile dataObjectFile = irodsAccessObjectFactory.getIRODSFileFactory(irodsAccount).instanceIRODSFile(absPath)
+ auditedActions = dataObjectAuditAO.findAllAuditRecordsForDataObject(dataObjectFile, 0, 1000)
+ } else {
+ log.info("is a collection, get audit info for it")
+ CollectionAuditAO collectionAuditAO = irodsAccessObjectFactory.getCollectionAuditAO(irodsAccount)
+ IRODSFile dataObjectFile = irodsAccessObjectFactory.getIRODSFileFactory(irodsAccount).instanceIRODSFile(absPath)
+ auditedActions = collectionAuditAO.findAllAuditRecordsForCollection(dataObjectFile, 0, 1000)
+ }
- render(view:"auditTable", model:[auditedActions:auditedActions])
+ render(view:"auditTable", model:[auditedActions:auditedActions])
+ return
+ } catch(CatNoAccessException cna) {
+ render(view:"auditNoAccess")
+ return
+ }
}
/**
diff --git a/idrop-web/grails-app/i18n/messages.properties b/idrop-web/grails-app/i18n/messages.properties
index f3a5469..234e02f 100644
--- a/idrop-web/grails-app/i18n/messages.properties
+++ b/idrop-web/grails-app/i18n/messages.properties
@@ -103,8 +103,9 @@ browse.page.prompt=Select a directory or file to see info and tags based on the
# messages
error.nothing.selected=Nothing was selected for the action
+error.no.audit.access=This user does not have permission to view audit data
error.no.data.found=No data found
-error.no.data.found=No ticket was found
+error.no.ticket.found=No ticket was found
error.data.error=Invalid data entered
error.unable.to.find.acl=Unable to find ACL data
error.no.path.provided=No file path provided in request
diff --git a/idrop-web/grails-app/views/audit/auditNoAccess.gsp b/idrop-web/grails-app/views/audit/auditNoAccess.gsp
new file mode 100644
index 0000000..4fb2d85
--- /dev/null
+++ b/idrop-web/grails-app/views/audit/auditNoAccess.gsp
@@ -0,0 +1 @@
+<h2><g:message code="error.no.audit.access" /></h2> \ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 28ef177..e09757a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -173,12 +173,6 @@
</dependency>
<dependency>
<groupId>org.irods.jargon</groupId>
- <artifactId>jargon-test</artifactId>
- <version>${jargon.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.irods.jargon</groupId>
<artifactId>jargon-data-utils</artifactId>
<version>${jargon.version}</version>
</dependency>