[Zope3-Users] PAU / credentials / authentication

2007-09-05 Thread Hermann Himmelbauer
Hi,
After thoroughly studying Philipp's book and the PAU-doctests, I unfortunately 
still have no clue how to do my authentication. My (simple) scenario is the 
following:

- I wrote a Zope package that can be added as a site
- I have one Zope instance with several of these sites
- Users should authenticate site-specific, e.g. users that authenticated for 
site A should not automatically be authenticated for site B and never for the 
Zope root
- I want to use Session Credentials
- I wrote an authenticator plug-in for an existing relational database that 
looks like this:

class PasswdAuthenticator(Persistent):
implements(IPasswd, IAuthenticatorPlugin, ILocation)
__parent__ = __name__ = None

def authenticateCredentials(self, credentials):
if not (credentials and 'login' in credentials and
'password' in credentials):
return
login, password = credentials['login'], credentials['password']
if relation_db_check(login,passwd):
return PrincipalInfo()

Now I have to glue all this together, but how?

Do I need a local, site specific PAU? If yes, how do I create/store one 
without the ZMI? I want that to automatically be done during site creation, 
e.g. via a subscriber (I have already one that builds the basic site 
structure). Probably a PAU is created like this:

pau = zope.app.authentication.PluggableAuthentication('myprefix_')

But - how do I add this to my site manager then? Have the prefixes to be 
different for every PAU that are located in the different sites?

How do I enable Session Credentials, or are they already enabled?

And - how do I tell the PAU to use my authentication utility, perhaps I have 
to create one and somehow place it into the PAU, as it's a container? Or 
should I register it as a local utility? Or as a global utility? In case of a 
utility, the Authenticator Plugin probably does not have to inherit from 
persistent.Persistent?

Moreover Philipp's book states that available plug-ins need to be configured 
but I don't know to do this without the ZMI?

Best Regards,
Hermann

-- 
[EMAIL PROTECTED]
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form, checkboxes for Bool fields - thanks a lot, now: z3c.form egg from svn

2007-09-05 Thread Andreas Reuleaux

Thanks again, works like a charm, i. e. both:

* your tree / buildout config with link to z3c.form from svn

* and the new checkbox.SingleCheckBoxFieldWidget

-Andreas

On Tue, Sep 04, 2007 at 10:40:32PM -0400, Stephan Richter wrote:
 On Tuesday 04 September 2007 21:13, Andreas Reuleaux wrote:
  Next question now: how do I tell zc.buildout to build an egg from svn
  for z3c.form? - I have tried this (adrn ist my application):
 
 My tree looks something like that:
 
 packages/
   z3c.form/   -- svn://svn.zope.org/repos/main/z3c.form/trunk
   z3c.formui/   -- svn://svn.zope.org/repos/main/z3c.form/trunk
   myprojects/
 z3c.form -- symlink to ../z3c.form
 
 In buildout.cfg of myproject, I have:
 
 [buildout]
 develop = . z3c.form
 
 Regards,
 Stephan
 -- 
 Stephan Richter
 CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
 Web2k - Web Software Design, Development and Training
 
 
 !DSPAM:46de72bc56542107185924!
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] buildout z3c.template: Download error: unknown url type: svn

2007-09-05 Thread Jeff Kowalczyk
When running buildout in fetch-newest mode, the following download error
occurs when fetching z3c.template:

Getting required 'z3c.template'
  required by z3c.formdemo 1.4.0.
Download error: unknown url type: svn -- Some packages may not be found!
Download error: unknown url type: svn -- Some packages may not be found!
Download error: unknown url type: svn -- Some packages may not be found!
Download error: unknown url type: svn -- Some packages may not be found!
We have the best distribution that satisfies 'z3c.template'.
Picked: z3c.template = 1.0-r75872

This an svn checkout of z3c.formdemo. Thanks.

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


Re: [Zope3-Users] z3c.form, style-attribute of TextWidget, TextAreaWidget

2007-09-05 Thread Andreas Reuleaux
On Tue, Sep 04, 2007 at 02:50:05PM -0400, Stephan Richter wrote:
 Note that we usually solve the problem you are heaving by specifying the input
 element's id as the CSS selector:

 input#form-widgets-firstName {
   width: 105px;
 }

got it

  Is there any particular reason why this style attribute was left out or is
  this just a bug? - The same for textarea_input.pt

 Bug. It is now fixed in the trunk for all widgets.

and thanks for fixing


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