]> source.dussan.org Git - archiva.git/commitdiff
cleanup logging and not displayed mapped ldap group to roles in screen
authorOlivier Lamy <olamy@apache.org>
Wed, 13 Feb 2013 23:52:34 +0000 (23:52 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 13 Feb 2013 23:52:34 +0000 (23:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1445990 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/general-admin.html

index 6f2ab26f784e3dcdfe95e64792b73fb7e1569e16..391b29bc826503865b4ce35d11a31078b029350b 100644 (file)
@@ -1231,16 +1231,12 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
 
     this.migratedFromRedbackConfiguration=ko.observable(migratedFromRedbackConfiguration);
 
-    $.log("new RedbackRuntimeConfiguration before configurationPropertiesEntries mapping:");
-
     this.configurationPropertiesEntries=ko.observableArray(configurationPropertiesEntries?configurationPropertiesEntries:[]);
     this.configurationPropertiesEntries.subscribe(function(newValue){
       self.modified(true);
       $.log("configurationPropertiesEntries modified")
     });
 
-    $.log("new RedbackRuntimeConfiguration before configurationPropertiesEntries mapping done");
-
     this.findPropertyValue=function(key){
       for(var i=0;i<self.configurationPropertiesEntries().length;i++){
         if(self.configurationPropertiesEntries()[i].key==key){
@@ -1266,22 +1262,29 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
   }
 
   mapRedbackRuntimeConfiguration=function(data){
-    $.log("mapRedbackRuntimeConfiguration");
+
     var ldapConfiguration=mapLdapConfiguration(data.ldapConfiguration);
-    $.log("mapLdapConfiguration done for ");
 
     var redbackRuntimeConfiguration =
             new RedbackRuntimeConfiguration(data.userManagerImpls,ldapConfiguration,data.migratedFromRedbackConfiguration,[]
                     ,data.useUsersCache,mapCacheConfiguration(data.usersCacheConfiguration));
 
-    $.log("mapRedbackRuntimeConfiguration done");
+
     var configurationPropertiesEntries = data.configurationPropertiesEntries == null ? []: $.each(data.configurationPropertiesEntries,function(item){
-      return new Entry(item.key, item.value,function(newValue){
+      var entry = new Entry(item.key, item.value,function(newValue){
         redbackRuntimeConfiguration.modified(true);
       });
+      return entry;
     });
+
     if (!$.isArray(configurationPropertiesEntries)){
       configurationPropertiesEntries=[];
+    } else {
+      configurationPropertiesEntries = $.each(configurationPropertiesEntries,function(item){
+        $.log("each configurationPropertiesEntries");
+        $.log("key:"+item);
+        return item;
+      });
     }
     redbackRuntimeConfiguration.configurationPropertiesEntries(configurationPropertiesEntries);
     redbackRuntimeConfiguration.modified(false);
index d5fba10401dec6208e7615048ee0473af58fa9fd..56be27cc1622c6f853db76865702a9cf558b8d40 100644 (file)
   </thead>
   <tbody>
   {{each(i, row) itemsOnCurrentPage()}}
+    {{var key = row.key}}
+    <!-- do not display mapped ldap groups as keys -->
+    {{if !key.startsWith('ldap.config.groups.')}}
     <tr>
       <td>
-        {{var key = row.key}}
         <a class="popover-doc"
            data-original-title="${$.i18n.prop('redback.runtime.properties.help.title')}"
            data-content="${$.i18n.prop(key+'.help.content')}">
       <td>${row.key}</td>
       <td><input type="text" class="input-xxlarge" data-bind="value: row.value"></td>
     </tr>
+    {{/if}}
   {{/each}}
   </tbody>