svn commit: samba r21852 - in branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr: .

derrell at samba.org derrell at samba.org
Fri Mar 16 12:52:58 GMT 2007


Rafal Szczesniak <mimir at samba.org> writes:

> On Thu, Mar 15, 2007 at 10:52:34PM -0400, derrell at samba.org wrote:
>> mimir at samba.org writes:
>> 
>> > +	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
>> > +	}
>> > +      }
>> > +      
>> > +    });
>> 
>> I'm not sure what you're doing here, but login is handled automatically for
>> all of the modules.  Either you don't understand the SWAT framework and its
>> standard capabilities, or (more likely) I just don't understand what you're
>> doing here.  If I'm off base, just tell me to shut up. :-)
>
> Yes, I know the login is handled by SWAT.
> I need to create NetContext for the host node. Since each host I connect
> to by means of libnet may require different credentials, I attach them
> to the node and create the actual context on the server side. So, this
> is creating libnet credentials rather than logging in to SWAT.
> There's one thing that might turned useful here. Default credentials could
> be created on the basis of SWAT login credentials. However, specifying
> different ones needs to be available. Right now, if there's nothing given
> yet, I ask (vide TODO).

Ok.  I didn't code the login dialog with the thought of it be using
externally, but it'd be nice if you could instantiate a login dialog using
that same code.  If you find that what's already there is not adequate, maybe
we can figure out how to change the existing login window code so that you can
use it.

Derrell


More information about the samba-technical mailing list