[Zope] Logon process

Dieter Maurer dieter at handshake.de
Fri Jul 13 14:00:24 EDT 2007


Garito wrote at 2007-7-9 02:24 +0200:
> ...
>To Dieter: I have a folder with some objects. This objects has 2 subgroups:
>availables for everyone and availables only for a role
>
>I would like to do folder.objectValues() and get a list of objects filtereds
>but I don't have any idea if I could do that

If "objectValues" means the standard Zope "ObjectManager" method,
then it does not do filtering based on permissions.

>What I can do (now if I solve the logon process will be finished) is have
>the whole list and filter in the read process: if user has access keep in
>the list, if not delete from it
>
>I try to do that with normal zope security machinery but with no success and
>I would like to finish as soon as possible

Even accessing an object for which the current user lacks the
so called "object permission" will result in an "Unauthorized" exception.

You may be able to allow import of "Unauthorized" and then use
"try: ... except Unauthorized: ...".



-- 
Dieter


More information about the Zope mailing list