Re: [OT] Re: [Zope-dev] Introducing a New Concept on Advanced Garbage Treatment Process

2001-04-23 Thread Martijn Pieters
On Fri, Apr 20, 2001 at 02:02:01PM -0700, Andy McKay wrote: Introducing a new concept on advanced garbage treatment process, and licensing patents For details, please reference the web site: The patent is flawed obviously since it doesn't garbage collect itself... Shows you how we

[Zope-dev] hack for refused authorization with virtual dataskin

2001-04-23 Thread Godefroid Chapelle
Hello, After rereading the ZopeSecurityPolicy source code, I tried the following hack. I add in the skinscript : WITH 1 COMPUTE __allow_access_to_unprotected_subobjects__=RESULT which does work : it fools the security mechanism. I can live with it but feel that there is only a slight

Re: [Zope-dev] ZCatalog waaaagh!

2001-04-23 Thread Chris Withers
Chris McDonough wrote: In the meantime, if you're desperate, here's a temporary fix... replace the items method of the UnTextIndex class in UnTextIndex.py. The current method looks something like this: def items(self): reurn self._index.items() change it to: def items(self):

Re: [Zope-dev] ZCatalog waaaagh!: The Error

2001-04-23 Thread Chris Withers
d'oh! Error type: strongTypeError/strongbr Error value: strongunsubscriptable object/strong Traceback (innermost last): File E:\Zope\2379A4~1.1\lib\python\ZPublisher\Publish.py, line 223, in publish_module File E:\Zope\2379A4~1.1\lib\python\ZPublisher\Publish.py, line 187, in

[Zope-dev] CoreSessionTracking

2001-04-23 Thread Magnus Heino (Rivermen)
Is onStart and onEnd broken in the CoreSessionTracking (0.8) product? (Or am I broken? :-)) I have a folder /Radio Within that folder I have a Session ID Manager and a Session Data Manager named Session. Session onStart method path of the Session ID Manager is set to /Radio/onStart I have an

Re: [Zope-dev] CoreSessionTracking

2001-04-23 Thread Chris McDonough
Is onStart and onEnd broken in the CoreSessionTracking (0.8) product? (Or am I broken? :-)) I hope neither ;-) I have a folder /Radio Within that folder I have a Session ID Manager and a Session Data Manager named Session. Session onStart method path of the Session ID Manager is set to

Re: [Zope-dev] ZCatalog waaaagh!: The Error

2001-04-23 Thread Chris McDonough
Can you give me something that reproduces this? - Original Message - From: Chris Withers [EMAIL PROTECTED] To: Chris McDonough [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, April 23, 2001 8:32 AM Subject: Re: [Zope-dev] ZCatalog wgh!: The Error d'oh! Error type:

SV: [Zope-dev] CoreSessionTracking

2001-04-23 Thread Magnus Heino (Rivermen)
The onStart method will be called when a session data object is created. Neither of the calls you show here create a session data object. Something like Session.getSessionData() would, however. Ah. I read when a session starts, you may call an external method or PythonScrip and thought

Re: [Zope-dev] ZCatalog waaaagh!

2001-04-23 Thread Chris McDonough
Sorry, I meant UnIndex.py! Doh! There is a more comprehensive fix checked in to 2.3.2b2. In the meantime, if you're desperate, here's a temporary fix... replace the items method of the UnTextIndex class in UnTextIndex.py. The current method looks something like this: def

SV: [Zope-dev] CoreSessionTracking

2001-04-23 Thread Magnus Heino (Rivermen)
This onStart method... sdo['date'] = context.ZopeTime() ...gives this error: -- 2001-04-23T14:36:32 PROBLEM(100) Session Tracking session event failed The call to function onStart failed. Traceback: Traceback (innermost last): File

Re: [Zope-dev] CoreSessionTracking

2001-04-23 Thread Chris McDonough
Darn. Security nails us once again. :-( I'll need to figure out how to allow __setitem__ to be called on session data objects from within a Python Script. In the meantime, use the .set method of the session data object, e.g. in the onStart function: sdo.set('Username', 'Foobar') .. or use

SV: [Zope-dev] CoreSessionTracking

2001-04-23 Thread Magnus Heino (Rivermen)
In the meantime, use the .set method of the session data object, e.g. in the onStart function: sdo.set('Username', 'Foobar') .. or use an external method. Ok, works now. Thanks. How to I access things like the DTML AUTHENTICATED_USER.getUserName() from a python script? /Magnus

Re: [Zope-dev] CoreSessionTracking

2001-04-23 Thread Chris McDonough
Alternately (and this will be in the next CST release), add this to the session data object class (SessionData.SessionData): __guarded_setitem__ = __setitem__ As far as finding the currently logged in user's name, try this: context.REQUEST['AUTHENTICATED_USER'].getUserName() This is a

Re: [Zope-dev] CoreSessionTracking

2001-04-23 Thread Chris Withers
Chris McDonough wrote: Darn. Security nails us once again. :-( I'll need to figure out how to allow __setitem__ to be called on session data objects from within a Python Script. Add a line below your definition of __setitem__ that reads: __guarded_setitem__ = __setitem__ cheers,

RE: [Zope-dev] CoreSessionTracking

2001-04-23 Thread Adrian Hungate
Title: RE: [Zope-dev] CoreSessionTracking Do you mean: from AccessControl import getSecurityManager security = getSecurityManager() user = security.getUser() userName = user.getUserName() ??? Adrian... -Original Message- From: Chris Withers [mailto:[EMAIL PROTECTED]] Sent:

Re: [Zope-dev] CoreSessionTracking

2001-04-23 Thread Chris McDonough
RE: [Zope-dev] CoreSessionTrackingThat's it! Except from DTML. ;-) - Original Message - From: Adrian Hungate To: 'Chris Withers' ; Chris McDonough Cc: Magnus Heino (Rivermen) ; [EMAIL PROTECTED] Sent: Monday, April 23, 2001 12:00 PM Subject: RE: [Zope-dev] CoreSessionTracking Do you

[Zope-dev] why is this more efficient

2001-04-23 Thread Tim McLaughlin
Found this in the constructor for the File Product and I don't understand why it is more efficient. (I want to subclass a File, so this does have some purpose ;-)) Anybody got any ideas? # First, we create the file without data: self._setObject(id, File(id,title,'',content_type,

RE: [Zope-dev] CoreSessionTracking

2001-04-23 Thread Randall F. Kern
_.SecurityGetUser() -Randy ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce

Re: [Zope-dev] ZPatterns AttributeProvider question

2001-04-23 Thread Christian Scholz
Hi! So here's more :) def _objectAdding(self,client, _tmap={ None:AddedStatus, DeletedStatus:ChangedStatus, ChangedStatus:AddedStatus } ): t = client._getTokenFor(self) s = t.status t.status =

Re: [Zope-dev] CoreSessionTracking

2001-04-23 Thread Chris McDonough
Nothing like good documentation ;-) Where can I find otu about that? http://www.zope.org/Members/michel/Projects/Interfaces/DTMLSecurityAPI Is there an equivalent of: dtml-var _.SecurityGetUser().getUserName() This works. ___ Zope-Dev

RE: [Zope-dev] CoreSessionTracking

2001-04-23 Thread Randall F. Kern
The documentation is in lib/python/AccessControl/DTML.py :) From: Chris Withers [mailto:[EMAIL PROTECTED]] dtml-var _.SecurityGetUser().getUserName() as for simplifying _.SecurityGetUser().getUserName(), BasicUser defines __str__ to return getUserName(), so dtml-var SecurityGetUser should

Re: [Zope-dev] CoreSessionTracking

2001-04-23 Thread Chris Withers
Chris McDonough wrote: Nothing like good documentation ;-) Where can I find otu about that? http://www.zope.org/Members/michel/Projects/Interfaces/DTMLSecurityAPI It's also in the security chapter of the Zope Book *embarrassed grinz* Randall F. Kern wrote: as for simplifying

[Zope-dev] has_role vs. hasRole

2001-04-23 Thread Stefane Fermigier
Hi, a developer who's working with me has been bitten by the following fact today, one year after me. There are two methods on objects BasicUser. One is called has_role and has the following docstring: Check to see if a user has a given role or roles. The other one is called hasRole, is an

[Zope-dev] Plugable brains changed in 2.3x vs 2.2?

2001-04-23 Thread Brad Clements
I've been using zope 2.2.2 with a plugable brain that does something like this: class Mybrain: def __init__(self): self.__dict['myvar'] = 'xyzzy' I just moved to the latest 2.3 beta and get an error that __dict__ doesn't exist. Anyone have a quick pointer for a fix, I have 60

[Zope-dev] Re: hack for refused authorization with virtual dataskin

2001-04-23 Thread Phillip J. Eby
At 01:37 PM 4/23/01 +0200, Godefroid Chapelle wrote: Hello, After rereading the ZopeSecurityPolicy source code, I tried the following hack. I add in the skinscript : WITH 1 COMPUTE __allow_access_to_unprotected_subobjects__=RESULT which does work : it fools the security mechanism. I can

Re: [Zope-dev] Plugable brains changed in 2.3x vs 2.2?

2001-04-23 Thread Brad Clements
On 23 Apr 2001, at 14:45, Brad Clements wrote: I've been using zope 2.2.2 with a plugable brain that does something like this: class Mybrain: def __init__(self): self.__dict['myvar'] = 'xyzzy' Uh, sorry, this should probably not be on zope-dev. anyway the answer is