take of karma or logged user when 403: session ended

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1397492 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-10-12 09:30:32 +00:00
parent 1ac1207ab9
commit a17c4e0906
2 changed files with 6 additions and 3 deletions

View File

@ -35,6 +35,10 @@ function() {
removeMediumSpinnerImg("#main-content");
clearUserMessages();
displayErrorMessage($.i18n.prop('authz.karma.needed'));
userLogged(function(user){
userLoggedCallbackFn(user);
});
},
500: function(data){
$.log("error 500:"+data.responseText);
@ -42,8 +46,6 @@ function() {
removeMediumSpinnerImg("#main-content");
clearUserMessages();
displayRestError($.parseJSON(data.responseText));
//$("#main-content" ).html("");
//displayErrorMessage($.i18n.prop('error.500'));
}
}
});

View File

@ -44,8 +44,9 @@ define("redback",["jquery","utils","jquery.validate","jquery.json","knockout",
type: "GET",
success: function(data) {
userLogged = data;
$.log("userLogged:"+userLogged);
if (successFn){
successFn(userLogged == false ? null : jQuery.parseJSON($.cookie('redback_login')));
successFn(userLogged ? jQuery.parseJSON($.cookie('redback_login')):null);
}
}
});