mirror of https://github.com/apache/archiva.git
Add admin user check after system configuration change
This commit is contained in:
parent
6dcd84d2db
commit
f327eb9b24
|
@ -1358,7 +1358,15 @@ define("archiva/admin/features/generaladmin/main",["jquery","jquery.ui","i18n","
|
|||
self.redbackRuntimeConfiguration().rbacManagerImpls.push(beanId);
|
||||
}
|
||||
|
||||
|
||||
var adminAvailableResponseFn = function(adminExists) {
|
||||
$.log("admin exists "+adminExists);
|
||||
if (adminExists) {
|
||||
window.sammyArchivaApplication.runRoute("get","#redbackruntimeconfig");
|
||||
} else {
|
||||
logout();
|
||||
displayWelcome();
|
||||
}
|
||||
}
|
||||
$.log("rememberme enabled:"+self.redbackRuntimeConfiguration().findPropertyValue("security.rememberme.enabled"));
|
||||
$.ajax("restServices/archivaServices/redbackRuntimeConfigurationService/redbackRuntimeConfiguration",
|
||||
{
|
||||
|
@ -1368,7 +1376,7 @@ define("archiva/admin/features/generaladmin/main",["jquery","jquery.ui","i18n","
|
|||
dataType: 'json',
|
||||
success: function(data) {
|
||||
var message=$.i18n.prop('redback-runtime-configuration.updated');
|
||||
window.sammyArchivaApplication.runRoute("get","#redbackruntimeconfig");
|
||||
checkCreateAdminLink(adminAvailableResponseFn);
|
||||
displaySuccessMessage(message);
|
||||
},
|
||||
error: function(data) {
|
||||
|
|
|
@ -826,13 +826,14 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
|
|||
createAdminLink.hide();
|
||||
}
|
||||
if(callbackFn) {
|
||||
callbackFn()
|
||||
callbackFn(adminExists)
|
||||
}
|
||||
$.log("adminExists:"+adminExists);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// handle url with registration link
|
||||
checkUrlParams=function(){
|
||||
var validateMeId = $.urlParam('validateMe');
|
||||
|
|
Loading…
Reference in New Issue