This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository coselmar. See http://git.codelutin.com/coselmar.git commit 429d342a7821880b4de9c9ab23b0edbd3bee85b4 Author: Yannick Martel <martel@©odelutin.com> Date: Mon Jan 5 10:34:57 2015 +0100 review user log error on document add --- .../java/fr/ifremer/coselmar/services/v1/DocumentsWebService.java | 2 +- coselmar-ui/src/main/webapp/js/coselmar.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/DocumentsWebService.java b/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/DocumentsWebService.java index 5ebda72..767c2aa 100644 --- a/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/DocumentsWebService.java +++ b/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/DocumentsWebService.java @@ -187,7 +187,7 @@ public class DocumentsWebService extends CoselmarWebServiceSupport { if (log.isErrorEnabled()) { log.equals(message); } - throw new CoselmarTechnicalException(message); + throw new InvalidCredentialException(message); } String documentName = document.getName(); diff --git a/coselmar-ui/src/main/webapp/js/coselmar.js b/coselmar-ui/src/main/webapp/js/coselmar.js index 6b91cf6..35d73d0 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar.js +++ b/coselmar-ui/src/main/webapp/js/coselmar.js @@ -108,6 +108,10 @@ coselmarApp.config(function($httpProvider) { 'responseError': function(rejection) { if (rejection.status == 401) { + //logout bad user + delete $scope.currentUser; + localStorage.removeItem('coselmar-jwt'); + // create return to path wanted var returnTo = $location.path(); $location.path("/401").search('returnTo', returnTo); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.