Re: [Zope] User Folder

2007-02-01 Thread Maciej Wisniowski

>security.declarePrivate('authenticateCredentials')
>def authenticateCredentials(self, credentials):
>""" Authentication Part """
>login = credentials.get('login', '')
>password = credentials.get('password', '')
>return login, login
>
> it work bad, it start with everything i put on username and password,
> it don´t validate if user exist. How can i do it???
I don't understand what you're doing.
Can describe your use case, please?

So far I know that you want to 'validate if user exists',
but where are your users defined? RDBMS? ZODB?
You should have plugin that implements:
IUserAdderPlugin interface. What plugin is this
in your environment?

Take a look at plugins/ZODBUserManager.

This plugin has three attributes:
self._user_passwords = OOBTree()
self._login_to_userid = OOBTree()
self._userid_to_login = OOBTree()

and it stores user data there.

Then it's authenticateCredentials is able to
check if user with specific login and password
exists there.

-- 
Maciej Wisniowski
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] User Folder

2007-01-31 Thread Maciej Wisniowski
Please, stay on list :)

--repost
start
> hello and thanks for answer me.
> My  plugin don´t work. I try put a user and password in plone, but it
> say me Error.
> I put the same than CAS but it don´t work too.
> Any idea?Thanks
--repost
end
> My  plugin don´t work. I try put a user and password in plone, but it
> say me Error.
And the 'Error' is ... !?

I'm not sure but isn't plone using modified version of PAS (Plone PAS)?
Maybe it is something because of that.

I've found plugin for plone that you may want to analyze:
http://plone.org/products/ip-range-pas-plugin.

In general what is your plugin supposed to do??

-- 
Maciej Wisniowski

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


Re: [Zope] User Folder

2007-01-31 Thread Maciej Wisniowski

>acl = self.getUserFolder() // Is this ok?
I think no.

Do you have any error tracebacks or what do you
mean by 'not working'?

Take a look at CAS4PAS plugin. It may
give you some clues.

-- 
Maciej Wisniowski
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )