Re: [Zope-dev] PAU question - how to I handle roles on principals
kevin gill a écrit : I have created a simple authenticator plug-in. It allows me to load my users from my database. The plug-in only allows me to control the name of a principal and validate their user name / password. I need to tell Zope which roles different users have. I have the roles stored on the database. How do I develop/install a plug-in/adapter which will will be invoked for the getRolesForPrincipal() method or be invoked as the IPrincipalRoleManager adapter? My authenticator just is setup to produce a zope.app.authentication.principalfolder.Principal for the Principal Object. Thanks Kevin Hi, I suppose you have to use a PrincipalAnnotations utility, which can store anything about principals which are not in the zodb (metadata, roles, etc.). (look at zope.app.principalannotations) Christophe ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
[Zope-dev] PAU question - how to I handle roles on principals
I have created a simple authenticator plug-in. It allows me to load my users from my database. The plug-in only allows me to control the name of a principal and validate their user name / password. I need to tell Zope which roles different users have. I have the roles stored on the database. How do I develop/install a plug-in/adapter which will will be invoked for the getRolesForPrincipal() method or be invoked as the IPrincipalRoleManager adapter? My authenticator just is setup to produce a zope.app.authentication.principalfolder.Principal for the Principal Object. Thanks Kevin ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
Re: [Zope-dev] Runaway processes
Hi Jim, first of all, thanks a lot for your quick response. On Thursday 06 December 2007, Jim Fulton wrote: > - You should avoid runaway processes. :) I'm actually quite serious. Yes, we are trying hard. :-) We are currently using lovely.remotetask to export those calls even to a different server, where we run the code in forked subprocesses. After having played for a day with this problem, I came to the following conclusion: Python assumes that all used C-libraries are wrapped in a way that they are non-blocking and cannot lock up. When forking, you better know what you are doing. Based on your comment, I think you agree. :-) > - You can run multiple processes and monitor their progress -- killing > processes that are stuck. I think this is a really good idea that requires little software and not much setup either. > zc.z3monitor provides some output that makes this pretty straightforward. Wow, zc.z3monitor -- and zc.ngi which I looked at too -- are very cool. How useful! I have been following the checkins and had an idea of what it was about, but it is definitely cooler than I thought. :-) However, some code calls a blocking operation, zc.z3monitor will be locked up as well. I guess then I only have to check whether I get connectivity or not. ;-) > - It might be interesting to see if Java or .Net give better control > over threads. If they do, then this might make Zope ports to Jython > or IronPython more interesting. (People who get upset by the Python > GIL should already find these platforms interesting.) Java has a lot more control over threads, but I still have found complaints that they left out some features for portability reasons. I could not immediately find an answer on whether blocking, run-away C-calls are handled correctly. I talked to Roy Mathew, a once at a time Java guru, and he said that Java has a time-limit it gives each thread for doing some work. (I am not supposed to quote him on that. ;-) So if that is true, then Java does not have the problem. Roy did mention, though, that debugging locked threads in Java is a common skill after you reached a certain level of Java Zen. I looked yesterday quiet a bit at Win32 threads. That part of the Win32 kernel seems pretty well thought out and from what I can tell you can have quiet a bit of control over the threads. Again, I am not sure how hanging threads are handled. BTW, there is a nice article on Python threads here (probably nothing new for you, Jim): http://linuxgazette.net/107/pai.html Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
[Zope-dev] Re: Re: MIME type syntax (was: Bug in zc.resourcelibrary?)
Thomas Lotze wrote: > OK, then we agree. Good that I did zc.resourcelibrary 0.8, not 1.0 > yesterday ;o) 0.8.1 is out now. It doesn't do any whitespace stripping anymore. -- Thomas ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
Re: [Zope-dev] Runaway processes
Some high-level drive-by comments: - You should avoid runaway processes. :) I'm actually quite serious. - You can run multiple processes and monitor their progress -- killing processes that are stuck. zc.z3monitor provides some output that makes this pretty straightforward. - It might be interesting to see if Java or .Net give better control over threads. If they do, then this might make Zope ports to Jython or IronPython more interesting. (People who get upset by the Python GIL should already find these platforms interesting.) JIm -- Jim Fulton Zope Corporation ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
[Zope-dev] Zope Tests: 5 OK
Summary of messages to the zope-tests list. Period Wed Dec 5 13:00:00 2007 UTC to Thu Dec 6 13:00:00 2007 UTC. There were 5 messages: 5 from Zope Unit Tests. Tests passed OK --- Subject: OK : Zope-2.7 Python-2.3.6 : Linux From: Zope Unit Tests Date: Wed Dec 5 20:54:44 EST 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-December/008751.html Subject: OK : Zope-2.8 Python-2.3.6 : Linux From: Zope Unit Tests Date: Wed Dec 5 20:56:14 EST 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-December/008752.html Subject: OK : Zope-2.9 Python-2.4.4 : Linux From: Zope Unit Tests Date: Wed Dec 5 20:57:44 EST 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-December/008753.html Subject: OK : Zope-2.10 Python-2.4.4 : Linux From: Zope Unit Tests Date: Wed Dec 5 20:59:15 EST 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-December/008754.html Subject: OK : Zope-trunk Python-2.4.4 : Linux From: Zope Unit Tests Date: Wed Dec 5 21:00:45 EST 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-December/008755.html ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
Re: [Zope-dev] Re: getting RestrictedPython working on Python 2.5
Baiju M wrote: - "Benji York" <[EMAIL PROTECTED]> wrote: Maybe we should have a default GETTING-STARTED.txt that goes along with bootstrap.py. May be we can add it to top-level README.txt of all packages. The good thing about a single file is that we can treat it like bootstrap.py. I.e., just have one file that is used everywhere, no editing or making sure the content stays up to date (other than updating the files wholesale when needed). -- Benji York Senior Software Engineer Zope Corporation ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )