At file:///home/jelmer/bzr.samba/4.0-envs/

------------------------------------------------------------
revno: 11690
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: 4.0-envs
timestamp: Tue 2007-03-20 23:37:18 +0100
message:
  Merge upstream
modified:
  source/dsdb/repl/replicated_objects.c svn-v2:[EMAIL PROTECTED]
  webapps/swat/source/class/swat/module/netmgr/Fsm.js svn-v2:[EMAIL PROTECTED]
  webapps/swat/source/class/swat/module/netmgr/Gui.js svn-v2:[EMAIL PROTECTED]
    ------------------------------------------------------------
    revno: 11684.1.63
    merged: svn-v2:[EMAIL PROTECTED]
    parent: svn-v2:[EMAIL PROTECTED]
    committer: metze
    timestamp: Fri 2007-03-16 16:35:44 +0000
    message:
      add a comment why we remove the rid_crypt obfuscation
      
      metze
    ------------------------------------------------------------
    revno: 11684.1.62
    merged: svn-v2:[EMAIL PROTECTED]
    parent: svn-v2:[EMAIL PROTECTED]
    committer: mimir
    timestamp: Fri 2007-03-16 00:19:40 +0000
    message:
      Further work on initialising libnet context from netmgr.
      
      
      rafal
=== modified file 'source/dsdb/repl/replicated_objects.c'
--- a/source/dsdb/repl/replicated_objects.c     2007-03-14 19:10:21 +0000
+++ b/source/dsdb/repl/replicated_objects.c     2007-03-16 16:35:44 +0000
@@ -103,6 +103,14 @@
        plain_buffer = data_blob_talloc(mem_ctx, checked_buffer.data, 
checked_buffer.length);
        W_ERROR_HAVE_NO_MEMORY(plain_buffer.data);
 
+       /*
+        * The following rid_crypt obfuscation isn't session specific
+        * and not really needed here, because we allways know the rid of the
+        * user account.
+        *
+        * But for the rest of samba it's easier when we remove this static
+        * obfuscation here
+        */
        if (rid_crypt) {
                uint32_t i, num_hashes;
 

=== modified file 'webapps/swat/source/class/swat/module/netmgr/Fsm.js'
--- a/webapps/swat/source/class/swat/module/netmgr/Fsm.js       2007-03-13 
02:54:06 +0000
+++ b/webapps/swat/source/class/swat/module/netmgr/Fsm.js       2007-03-16 
00:19:40 +0000
@@ -43,7 +43,7 @@
                result.data.origin == origins.Server &&
                result.data.code == serverErrors.ResourceError)
            {
-             this.debug("error" + result);
+             alert("Error when receiving rpc: '" + result.id + "'" + " 
exception: " + result.data);
            }
            else
            {
@@ -63,7 +63,13 @@
           {
             "swat.main.canvas" :
               "Transition_Idle_to_AwaitRpcResult_via_canvas_appear"
-          }
+          },
+
+         "changeSelection" :
+         {
+           "tree" :
+             "Transition_Idle_to_AwaitRpcResult_via_tree_selection_changed"
+         }
         }
     });
 
@@ -87,6 +93,37 @@
   // Add the new transition
   state.addTransition(trans);
 
+  var trans = new qx.util.fsm.Transition(
+    "Transition_Idle_to_AwaitRpcResult_via_tree_selection_changed",
+    {
+      "nextState" : "State_AwaitRpcResult",
+
+      "ontransition" :
+      function(fsm, event)
+      {
+       var nodes = event.getData();
+       var selectedNode = nodes[0];
+
+       var gui = swat.module.netmgr.Gui.getInstance();
+       var parentNode = gui.getParentNode(module, selectedNode);
+
+       if (typeof(parentNode.credentials) == "object")
+       {
+         var creds = parentNode.credentials;
+         var request = _this.callRpc("samba.ejsnet", "NetContext", [ creds ]);
+         request.setUserData("requestType", "NetContext");
+       }
+       else
+       {
+         // TODO: display a login dialog
+       }
+      }
+      
+    });
+
+  // Add the new transition
+  state.addTransition(trans);
+  
   blockedEvents =
   {
     "appear":

=== modified file 'webapps/swat/source/class/swat/module/netmgr/Gui.js'
--- a/webapps/swat/source/class/swat/module/netmgr/Gui.js       2007-03-13 
02:58:05 +0000
+++ b/webapps/swat/source/class/swat/module/netmgr/Gui.js       2007-03-16 
00:19:40 +0000
@@ -85,6 +85,26 @@
 };
 
 
+qx.Proto.getParentNode = function(module, node)
+{
+  var tree = this._tree;
+  var nodes = tree.getTableModel().getData();
+  if (nodes == undefined)
+  {
+    return undefined;
+  }
+
+  if (node.parentNodeId == 0)
+  {
+    // there is no parent node
+    return node;
+  }
+  
+  var parentNode = nodes[node.parentNodeId];
+  return parentNode;
+};
+
+
 qx.Proto._addHostNode = function(module, rpcRequest)
 {
   var fsm = module.fsm;
@@ -93,22 +113,20 @@
   // Get the tree widget
   var tree = this._tree;
   var dataModel = tree.getDataModel();
-
-  // Add new host and its service branches
+  
+  // Add new host and its service leaves
   var hostNodeId = dataModel.addBranch(null, hostname, false);
   
-  var domainNodeId = dataModel.addBranch(hostNodeId, "Domain", false);
-  var usersNodeId = dataModel.addBranch(hostNodeId, "Users", false);
-  var groupsNodeId = dataModel.addBranch(hostNodeId, "Groups", false);
-  var srvcsNodeId = dataModel.addBranch(hostNodeId, "Services", false);
-
-  // Services don't expand
-  dataModel.setState(domainNodeId, { bHideOpenClose : true });
-  dataModel.setState(usersNodeId, { bHideOpenClose : true });
-  dataModel.setState(groupsNodeId, { bHideOpenClose : true });
-  dataModel.setState(srvcsNodeId, { bHideOpenClose : true });
+  var domainNodeId = dataModel.addLeaf(hostNodeId, "Domain", false);
+  var usersNodeId = dataModel.addLeaf(hostNodeId, "Users", false);
+  var groupsNodeId = dataModel.addLeaf(hostNodeId, "Groups", false);
+  var srvcsNodeId = dataModel.addLeaf(hostNodeId, "Services", false);
   
   dataModel.setData();
+  tree.addEventListener("changeSelection", fsm.eventListener, fsm);
+
+  var hostNode = dataModel.getData()[hostNodeId];
+  hostNode.credentials = undefined;
 };
 
 

Reply via email to