Re: [Zope3-Users] Authentication howto

2007-06-11 Thread Nando Quintana
Hi Torvald,

I recommend you Philips,s zope3 book and specialy the security charpters
that explain the zope3 auth mechanics widely.

Here you are some notes about how to implement a user management
system...

1) First of all you have to create and register a PAU Utillity in your
siteManager. Read this code snippet:
kelpi.com/script/9141b4
as you can see there, you have to handle the after creation event to
create and register the pau utility.

2) The credentials are managed by the CookieCredentialsPlugin written by
Philipp V. W. See:
kelpi.com/script/c1c9a3

3) Here you have an example of a view for signing up proposals:
kelpi.com/script/e2019a

4) In this example:
kelpi.com/script/f49219
you can see an adapter that allows you to register a new user withing
the user folder in PAU.

If you need more lines of code or any other explanation, just tell me...

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: Vedr. Re: [Zope3-Users] Authentication howto

2007-06-11 Thread Nando Quintana
Hi,

I've uploaded you another piece of code:
kelpi.com/script/c880ba

There you have a view to handle login action. when auth is required zope
redirects you to "/loginForm.html" I redirect then to "/login" where I
prompt the user asking for user/pass.

In this zcml:
kelpi.com/script/fa9196

you can see the registration of some of the views that participates in
the sign up /login dance.

If you want to see all this code running:
http://trac.kelpi.com/browser/trunk/kelpi

this is the source code of kelpi.com

Take a look at it...

Bye,
Nando.


El mar, 12-06-2007 a las 00:08 +0200, Torvald Bringsvor escribió:
> Thanks for the samples you provided. Question: do you
> have any more samples on setting up for example a
> custom login screen (also with zcml code)?
> 

-- 
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


[Zope3-Users] nbest usage?

2007-07-02 Thread Nando Quintana
hi guys,

could anybody give me a clue about how to use nbest index?

I see that the 'apply()' method of several indexes gets a 'count'
parameter, but it's not used...

after reading this thread:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg02147.html
I really don't know if there is a way of retriving only N of the M
matching results...

how do you deal with a big amount of indexed objects? 
Have any of you usable searching experiences in huge ZODBs?

Thanks in advance,
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] Modified IntId utility

2007-09-26 Thread Nando Quintana
Hi Benji,

> We (ZC) have a package that  
> > does just that which we really need to release.  If there's  
> > interest I'll take a stab at doing that soon.
> 
> Yes, I would be very interested in that package. Very much  
> appreciated if you released it.

Hey! I'm also very interested on this package. Could I help you with
something to release it?

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] nbest usage?

2007-11-12 Thread Nando Quintana
Hi Stephan,

> > how do you deal with a big amount of indexed objects?
> 
> I think in general you want all objects, because you need to sort them 
> anyways. BTW, if Zope's indices don't cut it for you, you might want to look 
> at PyLucene integration.

Ok, thx. I'll take a look..

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] Re: how to eggify a zopeproject?

2008-01-25 Thread Nando Quintana
Raphael,

> Either include a MANIFEST file or make the egg from a subversion/cvs
> checkout. The former tells explicitly what to include the latter
> implicitly (everything that's under version control basically).

This means calling zopeproject with "--svn-repository" ...?
Ok, I'll try it.

> I'd suggest to look at buildout if you want to support
> such things as well.

So, buildout is the correct approach to deploy an egg as a zope app?
Ok.

thanks,
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


[Zope3-Users] how to eggify a zopeproject?

2008-01-25 Thread Nando Quintana
Hi all,

I have some questions about zopeproject... I've created a project with
zopeproject:
# easy_install -U setuptools
...
setuptools 0.6c7 is already the active version in easy-install.pth
...
# easy_install -U zopeproject
...
zopeproject 0.4.1 is already the active version in easy-install.pth
...
# zopeproject MyProjec



Then I've tried to eggify this zope project:

# cd MyProjec
# python setup.py sdist


The problem is that this action doesn't include the zcml files:

# tar --list -f dist/MyProject-0.1.tar.gz
MyProject-0.1/
MyProject-0.1/src/
MyProject-0.1/src/MyProject.egg-info/
MyProject-0.1/src/MyProject.egg-info/PKG-INFO
MyProject-0.1/src/MyProject.egg-info/SOURCES.txt
MyProject-0.1/src/MyProject.egg-info/dependency_links.txt
MyProject-0.1/src/MyProject.egg-info/entry_points.txt
MyProject-0.1/src/MyProject.egg-info/not-zip-safe
MyProject-0.1/src/MyProject.egg-info/paster_plugins.txt
MyProject-0.1/src/MyProject.egg-info/requires.txt
MyProject-0.1/src/MyProject.egg-info/top_level.txt
MyProject-0.1/src/myproject/
MyProject-0.1/src/myproject/__init__.py
MyProject-0.1/src/myproject/startup.py
MyProject-0.1/src/myproject/testing.py
MyProject-0.1/setup.py
MyProject-0.1/PKG-INFO
MyProject-0.1/setup.cfg



How should I modify the setup.py? Is there any "doc" about how to
distribute a lib created with zopeproject?

Then, if a user installs this egg, gets start script "myproject-ctl"
installed. Which is the list of thing he need to install?
create a zope instance? write a custom zdaemon.comf, deploy.ini,
zope.conf, site.zml?

Some general instructions would be very appreciated...

Thanks in advance,
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


[Zope3-Users] Re: how to eggify a zopeproject?

2008-01-26 Thread Nando Quintana
Hi Jim,

> - Eggs are great for distributing libraries.
> - They aren't ideal for distributing applications, which are often
> composed of many libraries, in the form is eggs.
> zc.buildout is a tool for assembling libraries and other parts to
> create working applications. (Of course, it is not the only tool.)

Ok. That clarifies my ideas.

> The zc.sourcerelease package provides a simple script that leverages
> buildout to help create self-contained source releases from working
> buildouts.  This is the tool that I use to distribute applications.

Interesting. I'll take a look on this... Thank you for the note.

Bye,
Nando.

-- 
http://www.nandoquintana.com/contact
___
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