diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java index 49c9bdbb1..bd9372bb3 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java @@ -147,10 +147,7 @@ public abstract class AbstractRestService protected void triggerAuditEvent( String repositoryId, String filePath, String action ) { - AuditEvent auditEvent = new AuditEvent( action, repositoryId ); - auditEvent.setAction( action ); - auditEvent.setRepositoryId( repositoryId ); - auditEvent.setResource( filePath ); + AuditEvent auditEvent = new AuditEvent( repositoryId, getPrincipal(), filePath, action ); AuditInformation auditInformation = getAuditInformation(); auditEvent.setUserId( auditInformation.getUser() == null ? "" : auditInformation.getUser().getUsername() ); auditEvent.setRemoteIP( auditInformation.getRemoteAddr() ); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/artifacts-management.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/artifacts-management.js index 5ef5b34fd..53e5880ae 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/artifacts-management.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/artifacts-management.js @@ -101,6 +101,9 @@ define("archiva.artifacts-management",["jquery","i18n","order!utils","order!jque $('#fileupload').bind('fileuploadsubmit', function (e, data) { var pomFile = data.context.find('#pomFile' ).attr("checked"); var classifier = data.context.find('#classifier' ).val(); + if (!data.formData){ + data.formData={}; + } data.formData.pomFile = pomFile; data.formData.classifier = classifier; });