diff options
author | Olivier Lamy <olamy@apache.org> | 2012-12-04 18:22:28 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-12-04 18:22:28 +0000 |
commit | 19e9ca8bb5f73d7ce644b4112eb4458ea23af96e (patch) | |
tree | 903a8bed0d27f13efa994bfeebf25e5b8fcada6d /archiva-modules/archiva-web | |
parent | d354911bba3bd54da92fd6c00ec92fbf8db347dc (diff) | |
download | archiva-19e9ca8bb5f73d7ce644b4112eb4458ea23af96e.tar.gz archiva-19e9ca8bb5f73d7ce644b4112eb4458ea23af96e.zip |
[MRM-1718] ldap configuration editable with the ui.
WORK IN PROGRESS !
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1417093 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web')
3 files changed, 16 insertions, 6 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaRuntimeConfigurationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaRuntimeConfigurationService.java index df0b6eeb7..88a7d51d8 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaRuntimeConfigurationService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaRuntimeConfigurationService.java @@ -60,7 +60,7 @@ public class DefaultArchivaRuntimeConfigurationService { try { - return archivaRuntimeConfigurationAdmin.getArchivaRuntimeConfigurationAdmin(); + return archivaRuntimeConfigurationAdmin.getArchivaRuntimeConfiguration(); } catch ( RepositoryAdminException e ) { @@ -75,7 +75,7 @@ public class DefaultArchivaRuntimeConfigurationService { // has user manager impl changed ? boolean userManagerChanged = !StringUtils.equals( archivaRuntimeConfiguration.getUserManagerImpl(), - archivaRuntimeConfigurationAdmin.getArchivaRuntimeConfigurationAdmin().getUserManagerImpl() ); + archivaRuntimeConfigurationAdmin.getArchivaRuntimeConfiguration().getUserManagerImpl() ); archivaRuntimeConfigurationAdmin.updateArchivaRuntimeConfiguration( archivaRuntimeConfiguration ); if ( userManagerChanged ) diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java index 5a2a08e9b..c6ef0b600 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java @@ -48,7 +48,7 @@ public class ArchivaConfigurableUsersManager try { String userManagerImplStr = - archivaRuntimeConfigurationAdmin.getArchivaRuntimeConfigurationAdmin().getUserManagerImpl(); + archivaRuntimeConfigurationAdmin.getArchivaRuntimeConfiguration().getUserManagerImpl(); log.info( "use userManagerImpl: '{}'", userManagerImplStr ); UserManager userManagerImpl = applicationContext.getBean( "userManager#" + userManagerImplStr, UserManager.class ); 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 6a2378e0b..343ddef07 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 @@ -253,12 +253,13 @@ require(["jquery","jquery.tmpl","i18n","knockout"], function(jquery,jqueryTmpl,i $.log("displayRedbackError with array"); for(var i=0; i<obj.errorMessages.length; i++ ) { if(obj.errorMessages[i].errorKey) { - $.log("displayRedbackError with array loop"); displayErrorMessage($.i18n.prop( obj.errorMessages[i].errorKey, obj.errorMessages[i].args ),idToAppend); } + if(obj.errorMessages[i].message) { + displayErrorMessage(obj.errorMessages[i].message,idToAppend); + } } } else { - $.log("displayRedbackError no array"); displayErrorMessage($.i18n.prop( obj.errorMessages.errorKey, obj.errorMessages.args ),idToAppend); } } @@ -301,7 +302,9 @@ require(["jquery","jquery.tmpl","i18n","knockout"], function(jquery,jqueryTmpl,i displayErrorMessage($.i18n.prop( data.errorKey ),idToAppend); } else if (data.errorMessages){ $.each(data.errorMessages, function(index, value) { - displayErrorMessage( $.i18n.prop(data.errorMessages[index].errorKey,data.errorMessages[index].args?data.errorMessages[index].args:null),idToAppend); + if(data.errorMessages[index].errorKey) { + displayErrorMessage( $.i18n.prop(data.errorMessages[index].errorKey,data.errorMessages[index].args?data.errorMessages[index].args:null),idToAppend); + } }); } else { $.log("print data.errorMessage:"+data.errorMessage); @@ -396,6 +399,13 @@ require(["jquery","jquery.tmpl","i18n","knockout"], function(jquery,jqueryTmpl,i // utils javascript string extensions //------------------------------------ + String.prototype.isEmpty = function(str) { + return ($.trim(this ).length < 1); + } + String.prototype.isNotEmpty = function(str) { + return ($.trim(this ).length > 0); + } + String.prototype.endsWith = function(str) { return (this.match(str+"$")==str) } |