diff options
author | Olivier Lamy <olamy@apache.org> | 2012-09-17 16:22:41 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-09-17 16:22:41 +0000 |
commit | 7d266951b75f9684f5ef014c8f417ff99dc7329b (patch) | |
tree | 5eab5ccdda7f69336db64aec5a476e3a1f81a07f /archiva-modules/archiva-web | |
parent | b07cc37a20fe493498db132135b8b3e307c8446f (diff) | |
download | archiva-7d266951b75f9684f5ef014c8f417ff99dc7329b.tar.gz archiva-7d266951b75f9684f5ef014c8f417ff99dc7329b.zip |
display error message if admin user not exists
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1386691 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web')
4 files changed, 11 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties index 2342722b1..39813deee 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties @@ -460,3 +460,8 @@ report.health.result.name=Name report.health.result.problem=Problem report.health.result.message=Message report.result.title=Result + +admin.creation.mandatory=You must create the admin user! + + + diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js index d48626a2e..97e0b4e51 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js @@ -644,6 +644,7 @@ function(jquery,ui,sammy,tmpl) { dataType: 'json', success: function(data) { var adminExists = data; + window.archivaModel.adminExists=adminExists; var createAdminLink=$("#create-admin-link"); if (adminExists == false) { createAdminLink.show(); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js index 886711189..6ae6465d9 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js @@ -123,6 +123,10 @@ require(["jquery","jquery.tmpl","i18n"], function(jquery,jqueryTmpl,i18n) { mainContent.removeAttr("data-bind"); $("#body_content" ).find(".popover" ).hide(); clearUserMessages(); + if(window.archivaModel.adminExists==false){ + displayErrorMessage($.i18n.prop("admin.creation.mandatory")); + } + } /** diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js index dcaa3956f..a3f678e7e 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js @@ -277,6 +277,7 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno dataType: 'json', success: function(data) { var adminExists = data; + window.archivaModel.adminExists=adminExists; if (adminExists == false) { window.redbackModel.createUser=true; |