]> source.dussan.org Git - archiva.git/commitdiff
control at least one rbacmanager/usermanager has been choosed
authorOlivier Lamy <olamy@apache.org>
Thu, 21 Feb 2013 23:41:57 +0000 (23:41 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 21 Feb 2013 23:41:57 +0000 (23:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1448856 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js

index 654b68d605ef00c2f6c2852e2a0c49d096820ce4..28576caf7c2f388be01acefda3350559e080c781 100644 (file)
@@ -678,6 +678,9 @@ runtime-configuration.maven.network.title=Maven Network
 redback.runtime.ldap.mapping.group.label=LDAP Groups
 redback.runtime.ldap.mapping.roles.label=Roles
 
+error.redback.runtimeconfiguration.user-managers.empty=You must choose at least one userManager
+error.redback.runtimeconfiguration.rbac-managers.empty=You must choose at least one rbacManager
+
 
 #welcome
 welcome.title=Welcome to Apache Archiva
index d5db925e001b125079316668ab396b1982225517..e63c42da197660b9f0a94de26159993257d39696 100644 (file)
@@ -1582,6 +1582,22 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
         }
       }
 
+      clearUserMessages();
+
+      if (self.usedUserManagerImpls().length<1){
+        displayErrorMessage( $.i18n.prop("error.redback.runtimeconfiguration.user-managers.empty"));
+        valid=false;
+      }
+
+      if (self.usedRbacManagerImpls().length<1){
+        displayErrorMessage( $.i18n.prop("error.redback.runtimeconfiguration.rbac-managers.empty"));
+        valid=false;
+      }
+
+      if(valid==false){
+        return;
+      }
+
       $.log("saveRedbackRuntimeConfiguration");
       var saveButton = mainContent.find("#redback-runtime-configuration-save" );
       saveButton.button('loading');