archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1445271 - in /archiva/trunk/archiva-modules: archiva-base/archiva-configuration/src/main/mdo/ archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ archiva-base/archiva-repos...
Date Tue, 12 Feb 2013 17:11:16 GMT
Author: olamy
Date: Tue Feb 12 17:11:15 2013
New Revision: 1445271

URL: http://svn.apache.org/r1445271
Log:
ldap writable save in archiva configuration

Modified:
    archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/LdapConfiguration.java
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/general-admin.html

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo?rev=1445271&r1=1445270&r2=1445271&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
Tue Feb 12 17:11:15 2013
@@ -1608,6 +1608,12 @@
           <type>boolean</type>
         </field>
         <field>
+          <name>writable</name>
+          <description>LDAP writable.</description>
+          <version>1.4.0+</version>
+          <type>boolean</type>
+        </field>
+        <field>
           <name>extraProperties</name>
           <version>1.4.0+</version>
           <type>Map</type>

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/LdapConfiguration.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/LdapConfiguration.java?rev=1445271&r1=1445270&r2=1445271&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/LdapConfiguration.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/LdapConfiguration.java
Tue Feb 12 17:11:15 2013
@@ -95,6 +95,11 @@ public class LdapConfiguration
      */
     private List<PropertyEntry> extraPropertiesEntries;
 
+    /**
+     * LDAP writable.
+     */
+    private boolean writable = false;
+
     public LdapConfiguration()
     {
         // no op
@@ -231,4 +236,14 @@ public class LdapConfiguration
     {
         this.baseGroupsDn = baseGroupsDn;
     }
+
+    public boolean isWritable()
+    {
+        return writable;
+    }
+
+    public void setWritable( boolean writable )
+    {
+        this.writable = writable;
+    }
 }

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java?rev=1445271&r1=1445270&r2=1445271&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java
Tue Feb 12 17:11:15 2013
@@ -132,6 +132,9 @@ public class DefaultRedbackRuntimeConfig
                 ldapConfiguration.setAuthenticationMethod(
                     userConfiguration.getString( UserConfigurationKeys.LDAP_AUTHENTICATION_METHOD,
null ) );
 
+                ldapConfiguration.setWritable(
+                    userConfiguration.getBoolean( UserConfigurationKeys.LDAP_WRITABLE, false
) );
+
                 redbackRuntimeConfiguration.setMigratedFromRedbackConfiguration( true );
 
                 updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration );
@@ -444,6 +447,11 @@ public class DefaultRedbackRuntimeConfig
     {
         RedbackRuntimeConfiguration conf = getRedbackRuntimeConfiguration();
 
+        if ( UserConfigurationKeys.LDAP_WRITABLE.equals( key ) )
+        {
+            return conf.getLdapConfiguration().isWritable();
+        }
+
         if ( conf.getConfigurationProperties().containsKey( key ) )
         {
             return Boolean.valueOf( conf.getConfigurationProperties().get( key ) );
@@ -472,6 +480,11 @@ public class DefaultRedbackRuntimeConfig
             return getRedbackRuntimeConfiguration().getLdapConfiguration().isSsl();
         }
 
+        if ( UserConfigurationKeys.LDAP_WRITABLE.equals( key ) )
+        {
+            return getRedbackRuntimeConfiguration().getLdapConfiguration().isWritable();
+        }
+
         RedbackRuntimeConfiguration conf = getRedbackRuntimeConfiguration();
 
         if ( conf.getConfigurationProperties().containsKey( key ) )

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js?rev=1445271&r1=1445270&r2=1445271&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js
Tue Feb 12 17:11:15 2013
@@ -1290,7 +1290,7 @@ define("archiva.general-admin",["jquery"
   }
 
   LdapConfiguration=function(hostName,port,ssl,baseDn,baseGroupsDn,contextFactory,bindDn,password,authenticationMethod,
-                             extraPropertiesEntries){
+                             extraPropertiesEntries,writable){
 
     var self=this;
     this.modified=ko.observable(false);
@@ -1333,6 +1333,11 @@ define("archiva.general-admin",["jquery"
 
     this.extraPropertiesEntries=ko.observableArray(extraPropertiesEntries);
     this.extraPropertiesEntries.subscribe(function(newValue){self.modified(true)});
+
+    //private boolean writable = false;
+    this.writable=ko.observable(writable);
+    this.writable.subscribe(function(newValue){self.modified(true)});
+
   }
 
   mapLdapConfiguration=function(data){
@@ -1346,7 +1351,7 @@ define("archiva.general-admin",["jquery"
         }
         $.log("mapLdapConfiguration done");
         return new LdapConfiguration(data.hostName,data.port,data.ssl,data.baseDn,data.baseGroupsDn,data.contextFactory,data.bindDn,data.password,
-                                    data.authenticationMethod,extraPropertiesEntries);
+                                    data.authenticationMethod,extraPropertiesEntries,data.writable);
       }
       return null;
   }

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/general-admin.html
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/general-admin.html?rev=1445271&r1=1445270&r2=1445271&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/general-admin.html
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/general-admin.html
Tue Feb 12 17:11:15 2013
@@ -1025,6 +1025,15 @@
               </div>
             </div>
             <div class="control-group">
+              <label for="ldap-writable" class="control-label">
+                ${$.i18n.prop('redback.runtime.ldap.writable.label')}
+              </label>
+              <div class="controls">
+                <input type="checkbox" id="ldap-writable" name="ldap-ssl"
+                       data-bind="checked: redbackRuntimeConfiguration().ldapConfiguration().writable"/>
+              </div>
+            </div>
+            <div class="control-group">
               <label for="ldapBaseDn" class="control-label">
                 ${$.i18n.prop('redback.runtime.ldap.baseDn.label')}
               </label>



Mime
View raw message