AW: [Zope-dev] Re: [Zope3-Users] How do I automatically login a user

2008-04-03 Thread Roger Ineichen
Ha David 

> Betreff: Re: [Zope-dev] Re: [Zope3-Users] How do I 
> automatically login a user
> 
> Thanks Jim for doing this. Actually, the domain is something 
> I have been looking for also. These other features are really 
> nice. I am hoping this
>   can be worked into something like z3c.authentication for 
> generic use. 
> Hoping roger is following this.

Yes, yes, just found no time to pickup this. But it's on the 
top of my 1000 things to do list ;-)

Note:
I started to make progress with z3c.authenticator.
This will become a replacement for z3c.authentication.simple
Does anybody think we will need a migration script?


Regards
Roger Ineichen
_
END OF MESSAGE

> Regards,
> David
> 
> Jim Fulton wrote:
> > 
> > Let's move this discussion to zope-dev.
> > 
> > On Apr 2, 2008, at 5:36 AM, kevin gill wrote:
> >> Please check in the code to the sandbox and I will have a 
> look at it. 
> >> The coding looks straight-forward, but choosing how to 
> work it into 
> >> the existing  components.
> >>
> >> I will look at the code and come back with questions.
> > 
> > 
> > I just checked 2 files, session.txt and session.py, into
> > 
> >   http://svn.zope.org/Sandbox/J1m/
> > 
> > These provide several features, most of which are of particular 
> > interest
> > here:
> > 
> > - An api to save session credentials independent of login,
> > 
> > - saving sha-encoded passwords,
> > 
> > - logout api
> > 
> > - having an optional additional credential of a user domain,
> >   (probably not of general interest)
> > 
> > Jim
> > 
> > --
> > Jim Fulton
> > Zope Corporation
> > 
> > 
> > ___
> > Zope-Dev maillist  -  [EMAIL PROTECTED] 
> > http://mail.zope.org/mailman/listinfo/zope-dev
> > **  No cross posts or HTML encoding!  ** (Related lists 
> > -http://mail.zope.org/mailman/listinfo/zope-announce
> > http://mail.zope.org/mailman/listinfo/zope )
> > 
> ___
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
> 

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How do I automatically login a user

2008-04-03 Thread kevin gill

Thanks for that Jim,

The code does what I want. I will have a good look at it and respond on
zope-dev on Tuesday (I only work Tuesday, Wedensdays and Thurday).

Thanks

Kevin


>
> Let's move this discussion to zope-dev.
>
> On Apr 2, 2008, at 5:36 AM, kevin gill wrote:
>> Please check in the code to the sandbox and I will have a look at
>> it. The
>> coding looks straight-forward, but choosing how to work it into the
>> existing  components.
>>
>> I will look at the code and come back with questions.
>
>
> I just checked 2 files, session.txt and session.py, into
>
>http://svn.zope.org/Sandbox/J1m/
>
> These provide several features, most of which are of particular
> interest here:
>
> - An api to save session credentials independent of login,
>
> - saving sha-encoded passwords,
>
> - logout api
>
> - having an optional additional credential of a user domain,
>(probably not of general interest)
>
> Jim
>
> --
> Jim Fulton
> Zope Corporation
>
>
>
> --
> ** Email Scanned by Elive's Virus Scanning Service -
> http://www.elive.net **
>
>
>
>
>



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re[2]: [Zope3-Users] bsquare'ing

2008-04-03 Thread Adam GROSZER
Hello Paul,

Having the same ideas here.
I'll improve if you don't mind.

Thursday, April 3, 2008, 6:35:01 PM, you wrote:

PC> I think the problem you are having is that buildout Is not installed  
PC> on your system. I'm not sure what the buildout bootstrap command does
PC> but I imagine it is a replacement for the bootstrap.py script.  
PC> Personally, I think bootstrap.py should be used when it is available.

PC> I like your suggested changes and I'd like to add some more. It would
PC> be really cool if bsquare could see that buildout.cfg is using  
PC> "develop" packages and somehow how check the develop packages out  
PC> automatically. It would also be nice to parse the dependencies of a  
PC> package and rebuild it whenever a dependency is rebuilt. Finally my  
PC> last wish is that bsquare can be used without installing buildbot or  
PC> twisted on the system. That would mean depending on buildbot and  
PC> zope.app.twisted and adding console script entry points for the  
PC> relevant command line scripts they provide. I've been meaning to make
PC> some of these changes in pcardune-setup branch but haven't had a lot  
PC> of time.

PC> - Paul

PC> On Apr 3, 2008, at 3:39 AM, Adam GROSZER <[EMAIL PROTECTED]> wrote:

>> Hello,
>>
>> I'm trying to setup a buildbot here for our buildout based packages.
>>
>> What I don't get is, how that works:
>>f.addStep(Compile(name='bootstrap',
>>command='buildout bootstrap .',
>>description=['bootstrapping'],
>>descriptionDone=['bootstrap']))
>>
>> We used to issue "python2.4 bootstrap.py",
>> "buildout bootstrap ." gives an error, unless I'm missing something.
>>
>> Also, I'd propose some enhancements too:
>>
>> -def configure(svn_url, http_port=8010, allowForce=False):
>> +def configure(svn_url, svnuser=None, svnpasswd=None,  
>> http_port=8010,allowForce=False, poller=None):
>>"""Creates a buildout master configuration.
>>
>>The configuration returned is almost functional. You just need to  
>> add
>>slaves.
>>
>>"""
>>c = {}
>>c['slavePortnum'] = 8989
>> -c['change_source'] = SVNPoller(svn_url, split_file=split_file,  
>> pollinterval=30)
>> +if poller:
>> + c['change_source'] = poller
>> +else:
>> + c['change_source'] = SVNPoller(svn_url, svnuser=svnsuer,  
>> svnpasswd=svnpasswd, split_file=split_file, pollinterval=30)
>>
>> Christian, opinions? Where to make those changes?
>>
>>
>> -- 
>> Best regards,
>> Adam GROSZER  mailto:[EMAIL PROTECTED]
>> --
>> Quote of the day:
>> "Life is 10% of what happens to you and 90% of how you respond to it."
>>
>> ___
>> Zope3-users mailing list
>> Zope3-users@zope.org
>> http://mail.zope.org/mailman/listinfo/zope3-users


-- 
Best regards,
 Adam GROSZERmailto:[EMAIL PROTECTED]
--
Quote of the day:
If at first you don't succeed, give up, no use being a damn fool.

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] bsquare'ing

2008-04-03 Thread Paul Carduner
I think the problem you are having is that buildout Is not installed  
on your system. I'm not sure what the buildout bootstrap command does  
but I imagine it is a replacement for the bootstrap.py script.  
Personally, I think bootstrap.py should be used when it is available.


I like your suggested changes and I'd like to add some more. It would  
be really cool if bsquare could see that buildout.cfg is using  
"develop" packages and somehow how check the develop packages out  
automatically. It would also be nice to parse the dependencies of a  
package and rebuild it whenever a dependency is rebuilt. Finally my  
last wish is that bsquare can be used without installing buildbot or  
twisted on the system. That would mean depending on buildbot and  
zope.app.twisted and adding console script entry points for the  
relevant command line scripts they provide. I've been meaning to make  
some of these changes in pcardune-setup branch but haven't had a lot  
of time.


- Paul

On Apr 3, 2008, at 3:39 AM, Adam GROSZER <[EMAIL PROTECTED]> wrote:


Hello,

I'm trying to setup a buildbot here for our buildout based packages.

What I don't get is, how that works:
   f.addStep(Compile(name='bootstrap',
   command='buildout bootstrap .',
   description=['bootstrapping'],
   descriptionDone=['bootstrap']))

We used to issue "python2.4 bootstrap.py",
"buildout bootstrap ." gives an error, unless I'm missing something.

Also, I'd propose some enhancements too:

-def configure(svn_url, http_port=8010, allowForce=False):
+def configure(svn_url, svnuser=None, svnpasswd=None,  
http_port=8010,allowForce=False, poller=None):

   """Creates a buildout master configuration.

   The configuration returned is almost functional. You just need to  
add

   slaves.

   """
   c = {}
   c['slavePortnum'] = 8989
-c['change_source'] = SVNPoller(svn_url, split_file=split_file,  
pollinterval=30)

+if poller:
+ c['change_source'] = poller
+else:
+ c['change_source'] = SVNPoller(svn_url, svnuser=svnsuer,  
svnpasswd=svnpasswd, split_file=split_file, pollinterval=30)


Christian, opinions? Where to make those changes?


--
Best regards,
Adam GROSZER  mailto:[EMAIL PROTECTED]
--
Quote of the day:
"Life is 10% of what happens to you and 90% of how you respond to it."

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope-dev] Re: [Zope3-Users] How do I automatically login a user

2008-04-03 Thread David Pratt
Thanks Jim for doing this. Actually, the domain is something I have been 
looking for also. These other features are really nice. I am hoping this 
 can be worked into something like z3c.authentication for generic use. 
Hoping roger is following this.


Regards,
David

Jim Fulton wrote:


Let's move this discussion to zope-dev.

On Apr 2, 2008, at 5:36 AM, kevin gill wrote:

Please check in the code to the sandbox and I will have a look at it. The
coding looks straight-forward, but choosing how to work it into the
existing  components.

I will look at the code and come back with questions.



I just checked 2 files, session.txt and session.py, into

  http://svn.zope.org/Sandbox/J1m/

These provide several features, most of which are of particular interest 
here:


- An api to save session credentials independent of login,

- saving sha-encoded passwords,

- logout api

- having an optional additional credential of a user domain,
  (probably not of general interest)

Jim

--
Jim Fulton
Zope Corporation


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How do I automatically login a user

2008-04-03 Thread Jim Fulton


On Apr 2, 2008, at 7:02 PM, Darryl Cousins wrote:


Is the code already available for a look? I've played with several
credentials options and would very much like to see what you have  
here.



It is now. Thanks for the reminder. See my response to Kevin.

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How do I automatically login a user

2008-04-03 Thread Jim Fulton


Let's move this discussion to zope-dev.

On Apr 2, 2008, at 5:36 AM, kevin gill wrote:
Please check in the code to the sandbox and I will have a look at  
it. The

coding looks straight-forward, but choosing how to work it into the
existing  components.

I will look at the code and come back with questions.



I just checked 2 files, session.txt and session.py, into

  http://svn.zope.org/Sandbox/J1m/

These provide several features, most of which are of particular  
interest here:


- An api to save session credentials independent of login,

- saving sha-encoded passwords,

- logout api

- having an optional additional credential of a user domain,
  (probably not of general interest)

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re[2]: [Zope-dev] bsquare'ing

2008-04-03 Thread Adam GROSZER
Hello,

It's real simple:

 in dir /home/agroszer/buildbot/slave/cache/build (timeout 1200 secs)
 watching logfiles {}
 argv: ['/bin/sh', '-c', 'buildout bootstrap .']
 environment:
...
 closing stdin
 using PTY: True
/bin/sh: line 1: buildout: command not found
program finished with exit code 127

Thursday, April 3, 2008, 2:21:50 PM, you wrote:

BY> Adam GROSZER wrote:
>> We used to issue "python2.4 bootstrap.py",
>> "buildout bootstrap ." gives an error, unless I'm missing something.

BY> I'm not familiar with Christian's work with bsquare, but suspect giving
BY> him the actual error message would be helpful.


-- 
Best regards,
 Adam GROSZERmailto:[EMAIL PROTECTED]
--
Quote of the day:
If you want to know how old a man is, ask his brother-in-law.

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope-dev] bsquare'ing

2008-04-03 Thread Benji York

Adam GROSZER wrote:

We used to issue "python2.4 bootstrap.py",
"buildout bootstrap ." gives an error, unless I'm missing something.


I'm not familiar with Christian's work with bsquare, but suspect giving 
him the actual error message would be helpful.

--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] bsquare'ing

2008-04-03 Thread Adam GROSZER
Hello,

I'm trying to setup a buildbot here for our buildout based packages.

What I don't get is, how that works:
f.addStep(Compile(name='bootstrap',
command='buildout bootstrap .',
description=['bootstrapping'],
descriptionDone=['bootstrap']))

We used to issue "python2.4 bootstrap.py",
"buildout bootstrap ." gives an error, unless I'm missing something.

Also, I'd propose some enhancements too:

-def configure(svn_url, http_port=8010, allowForce=False):
+def configure(svn_url, svnuser=None, svnpasswd=None, 
http_port=8010,allowForce=False, poller=None):
"""Creates a buildout master configuration.

The configuration returned is almost functional. You just need to add
slaves.

"""
c = {}
c['slavePortnum'] = 8989
-c['change_source'] = SVNPoller(svn_url, split_file=split_file, 
pollinterval=30)
+if poller:
+ c['change_source'] = poller
+else:
+ c['change_source'] = SVNPoller(svn_url, svnuser=svnsuer, 
svnpasswd=svnpasswd, split_file=split_file, pollinterval=30)

Christian, opinions? Where to make those changes?


-- 
Best regards,
 Adam GROSZER  mailto:[EMAIL PROTECTED]
--
Quote of the day:
"Life is 10% of what happens to you and 90% of how you respond to it."

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How do I automatically login a user

2008-04-03 Thread Nando Quintana
Hi Kevin,

> During my registration process I want to automatically login the user (in
> Zope3).

After registration, I do the login in the same BrowserPage:

from zope.app.security.interfaces import IAuthentication
from zope.app import zapi

#[...]
# Registration staff
#[...]

# get the principal obj
pau =  zapi.getUtility(IAuthentication)
principal = pau['principals'][login]
principal.id = login
# set it to the request
self.request.setPrincipal(principal)

Bye,
Nando.

-- 
http://www.nandoquintana.com/contact


signature.asc
Description: Esta parte del mensaje está firmada	digitalmente
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope3 packages inside a standalone application

2008-04-03 Thread Adam GROSZER
Hello Marco,

I would say it won't hurt if you flatten the namespace.
You might also try to add all required packages to the PYTHONPATH then
hopefully py2exe will find them.
Test it well, also with the exe built.

Thursday, April 3, 2008, 8:33:02 AM, you wrote:

MDF> I'm using zope3 packages inside a standalone application.
MDF> I've found references that the zca package tree can be used outside of
MDF> zope, but I'm using also zope.wfmc and related (including zodb3).

MDF> To be able to build an exe file with py2exe I've flattened the namespace
MDF> of the packages I'm using, by copying them in my app folder recreating a
MDF> single zope namespace (py2exe doesn't support namespaces yet).

MDF> Is this kind of unusual zope3 packages use possible, or am I going to 
MDF> have trouble with it being totally unsupported?

MDF> Please note that I'm not yet a zope3 expert and I didn't run tests on 
MDF> this setup, but it seems to work.

MDF> Thanks
MDF> ___
MDF> Zope3-users mailing list
MDF> Zope3-users@zope.org
MDF> http://mail.zope.org/mailman/listinfo/zope3-users


-- 
Best regards,
 Adam GROSZERmailto:[EMAIL PROTECTED]
--
Quote of the day:
Things are more like they used to be than they are now.

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users